Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hierarchical SQL Select
Message
De
07/09/2009 23:36:24
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01422513
Message ID:
01423020
Vues:
23
>>>>>>(1) Where do you see it allows space chars
>>>>>>
>>>>>
>>>>>Gregory,
>>>>>
>>>>>I just tested them with the little program in VFP.
>>>>So, did I - don't see it
>>>>
>>>>What part of the regex do you think allows a space char ?
>>>
>>>Is my test program wrong?
>>>
>>>
>>>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')
>>>
>>>BTW, starting your day early today?
>>
>>Look at the matches collection - not at test(). If you want to look at test(), use
>>
>>^((((http[s]?|ftp)://)|(www\.))[\w/.()-]+[\w/.(-])$
>>
>>
>>In the last example it only matches
>>
http://msdn.microsoft.com/en-us/library/
>
>I'll re-write the test program, for now this
>
>http://msdn.microsoft.com/en-us/library/aa172799(SQL.80.aspx - works as a valid HTML

Why shouldn't it - Who says the parentheses must match ?


>and
>
>www.test as valid.
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform