Dim rg As New RegEx
rg.searchPattern="/\\b(?:(?:https?|ftp):\\/\\/|www\\.)[-a-z0-9+&@#\\/%?=~_|!:,.;]*[-a-z0-9+&@#\\/%=~_|]/i"
err_flag=(rg.search(url)= Nil)
I found this RegEx on the web… but it seems to return TRUE regardless of what I pass it…
123 returns TRUE… expected www.rdS.com returns true. NOT expected.
Patterns within Xojo should not contain delimiters like “/” and will not recognize trailing switches ("/i"
at the end of the pattern, meaning “case-insensitive”).
To be clear, other languages like perl or PHP require the pattern to be surrounded by delimiters like “/pattern/”. With the RegEx class, you just need “pattern”, and any delimiters would be considered part of the pattern.