>CLEAR ALL > >lcPattern = '(((http[s]?|ftp)://)|(www\.))[\w/.()-]+[\w/.(-]' > >local obj > obj = createobject('VBScript.RegExp') > obj.Global = .F. > obj.IgnoreCase = .T. > obj.Pattern = m.lcPattern &&'\bking\b' > > ?obj.Test('http://msdn.microsoft.com/en-us/library/aa172799SQL.80.aspx') >* extra space at the end > ?obj.Test('www.msdn.microsoft.com/en-us/library/aa139615.aspx ') > > ?obj.Test('http://msdn.microsoft.com/en-us/library/aa172799(SQL.80).aspx') > ?obj.Test('http://msdn.microsoft.com/en-us/library/aa172799SQL.80.a') > >* Here - a space in the middle > ?obj.Test('http://msdn.microsoft.com/en-us/library/ aa172799SQL.80.a') > ?obj.Test('www.test')>
^((((http[s]?|ftp)://)|(www\.))[\w/.()-]+[\w/.(-])$In the last example it only matches
http://msdn.microsoft.com/en-us/library/