Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 110391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:13:11+00:00 2026-05-11T02:13:11+00:00

In regards to this: http://stackoverflow.uservoice.com/pages/general/suggestions/103227-parser-does-not-match-all-valid-urls is this regex adequate or will it need to

  • 0

In regards to this: http://stackoverflow.uservoice.com/pages/general/suggestions/103227-parser-does-not-match-all-valid-urls is this regex adequate or will it need to be refined, if it needs to be refined how so?

\b(?P<link>(?:.*?://)[\w\-\_\.\@\:\/\?\#\=]*)\b 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T02:13:11+00:00Added an answer on May 11, 2026 at 2:13 am

    Even though the question is vague, I’ll attempt to respond with possible solutions.

    Possible Intention 1: To match any URL’s in a given file (for replacement):

    /^([^:]+):\/\/([-\w._]+)(\/[-\w._]\?(.+)?)?$/ig 

    The above should match nearly all URL formats, with the following captured groups:

    0 => entire match 1 => protocol (eg. http, ftp, git, ...) 2 => hostname (eg. www.stackoverflow.com) 3 => requested_file_path (eg. /images/prod/1/4/success.gif) 4 => query_string (eg. param=1&param2=2&param3=3) 

    Possible Intention 2: To get details about the current request url

    In order to get details about the url such as the protocol, hostname, requested file path, and query string, you’re better off using language/object methods to gather the results. In php you can get all of the above information using function calls:

    $protocol = $_SERVER['SERVER_PROTOCOL']; // HTTP/1.0 $host = $_SERVER['HTTP_HOST']; // www.stackoverflow.com $path_to_file = dirname($_SERVER['SCRIPT_NAME']); $file = basename($_SERVER['SCRIPT_NAME']); $query_string = $_SERVER['QUERY_STRING']; 

    Hope this helps in any way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I don't think it's that resource intensive, but common sense… May 11, 2026 at 12:35 pm
  • added an answer You could simply check for the existence of HKEY_CLASSES_ROOT\CLSID\{dee35070-506b-11cf-b1aa-00aa00b8de95} which… May 11, 2026 at 12:35 pm
  • added an answer Eric Sink's Source Control HOWTO is a nice (non tool-specific)… May 11, 2026 at 12:35 pm

Related Questions

This is in regards to a situation where Session is used to store some
I'm pretty sure this is a simple question in regards to formatting but here's
Thinking in regards to Sliverlight, I would like to know where would be good
I'm trying to find some references in regards to x86 Assembly languages. Tutorials/Examples to
When I profile my application using SQL Server Profiler, I am seeing lots of
I am testing against the following test document: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE html PUBLIC
I'm currently trying to build an application that inherently needs good time synchronization across
I'm running in to a lot of inconsistencies with regards to what will compile

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.