Your code is very similar to what I tried. I found it (and your
variation) returns valid results for totally invalid URLs.

On 8/31/06, Charles Yeomans <[EMAIL PROTECTED]> 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.
_______________________________________________
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>

Reply via email to