On Aug 31, 2006, at 10:38 AM, Charles Yeomans wrote:
dim r as new RegEx
r.SearchPattern = "(([a-zA-Z][0-9a-zA-Z+\\-\\.]*:)?/{0,2}[0-9a-zA-
Z;/?:@&=+$\\.\\-_!~*'()%]+)?(#[0-9a-zA-Z;/?:@&=+$\\.\\-_!~*'()%]+)?"
dim match as RegExMatch = r.Search(EditField1.Text)
if match <> nil then
MsgBox "Validated: " + match.SubExpressionString(0)
else
MsgBox "Failed."
end if
But it's not clear to me that this regular expression does quite
what one expects.
All this RegEx really does is verify that a URL is within the
contents of the string... you can have 100 pages of data and it will
locate the first URL. As written, this search pattern does not
verify that the entire source string is a valid URL.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>