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

  • SEARCH
  • Home
  • 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 6167991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:36:31+00:00 2026-05-23T22:36:31+00:00

([\w-]+.)+[\w-]+(/[\w- ./?%&=]*)? I am using the above expression for URL validation. But the problem

  • 0

([\w-]+.)+[\w-]+(/[\w- ./?%&=]*)?
I am using the above expression for URL validation. But the problem is when I give only ‘www.yahoo’ and press the save button I didn’t get any error message. Please offer a solution.

Thank you

  • 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. Editorial Team
    Editorial Team
    2026-05-23T22:36:34+00:00Added an answer on May 23, 2026 at 10:36 pm

    Well, I guess that post relates more to python. You might find something similar in ASP.NET as well.

    But if you want to parse it yourself, you should refer to the RFC 2396 (URI Generic Syntax), which provides the regex and breaks it into components in Appendix B:

      ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
       12            3  4          5       6  7        8 9
    

    The numbers in the second line above are only to assist
    readability; they indicate the reference points for each
    subexpression (i.e., each paired parenthesis). We refer to the
    value matched for subexpression as $. For example, matching
    the above expression to

      http://www.ics.uci.edu/pub/ietf/uri/#Related
    

    results in the following subexpression matches:

      $1 = http:
      $2 = http
      $3 = //www.ics.uci.edu
      $4 = www.ics.uci.edu
      $5 = /pub/ietf/uri/
      $6 = <undefined>
      $7 = <undefined>
      $8 = #Related
      $9 = Related
    

    where indicates that the component is not present, as
    is the case for the query component in the above example.
    Therefore, we can determine the value of the four components and
    fragment as

      scheme    = $2
      authority = $4
      path      = $5
      query     = $7
      fragment  = $9
    

    and, going in the opposite direction, we can recreate a URI reference
    from its components using the algorithm in step 7 of Section 5.2.

    EDIT:

    After a bit of Googling, I found this in ASP.NET: System.Uri, e.g.:

    Uri uri = new Uri("http://www.ics.uci.edu/pub/ietf/uri/#Related");
    Console.WriteLine(uri.AbsoluteUri);
    Console.WriteLine(uri.Host);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using POSIX threads & C++, I have an Insert operation which can only be
I'm currently using the following regular expression to validation URLs: ^(?#Protocol)(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?#Username:Password)(?:\w+:\w+@)? (?#Subdomains)(?:(?:[-\w]+\.)+(?#TopLevel Domains)(?:com|org|net|gov|mil|biz|edu|info|mobi|name|aero|jobs|museum|travel|[a-z]{2}))(?#Port)(?::[\d]{1,5})?(?#Directories)(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?#Query)(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?#Anchor)(?:#(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)?$ I
Ok we have the following re-written URL using UrlRewriter.net /category/games/21 using the following expression.
I am using a user input string to create a url and I only
i would like to match a part of the string using lookarounds, but only
I'm using C# & .NEt 3.5. What is the difference between the OptionA and
I've been using PHP & MySQL for ages and am about to start using
I wrote an application server (using python & twisted) and I want to start
I've created an web authentication app using c# & asp.net and want to bounce
Is there an ASP.NET AJAX framework other than just using UpdatePanel & Friends or

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.