![]() |
|
|
| 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! |
|
| There is no answer at this time. |
|
| There are no comments at this time. |
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 Home - Answers FAQ - Terms of Service - Privacy Policy |