Google Answers Logo
View Question
 
Q: Regular Expression Help Needed (MS .NET) ( No Answer,   0 Comments )
Question  
Subject: Regular Expression Help Needed (MS .NET)
Category: Computers
Asked by: infiniteblue-ga
List Price: $20.00
Posted: 02 Jan 2003 06:56 PST
Expires: 03 Jan 2003 14:23 PST
Question ID: 136401
Here is what I currently have:
(?i:href)\s*=\s*["'](?:(?<protocol>[^:/?#"']+):)?(?://(?<host>[^/?#"']*))?(?<path>[^?#"']*.aspx)(?:\?(?<query>[^#"']*))?(?:#(?<anchor>[^"']*))?

This Regex searches for all URLs that end with .aspx inside HREF tags
and then splits them apart into their components. I want to change two
things: The protocol is currently returned as "http" or "https" I need
"http://", "https://", etc. Request #2: I need two versions of this
expression, one version that returns matches where the {host} =
"www.mydomain.com" OR {host} is empty. The second version is the
inverse and should return all matches where {host} !=
"www.mydomain.com" AND {host} is not empty. Thanks!
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy