[Gambas-user] Issue 485 in gambas: 'Like' square brackets problem

MinnesotaJon nicholso at ...2533...
Thu Dec 26 06:23:39 CET 2013


It appears that the problem happens if the first letter of the string being
matched appears anywhere in the "Pattern" before the actual match.  Your
original examples were:

Print "GambasIDE" Like "{alma,Gambas,szilva,GambasIDE,otto}"
Output: False 

Print "GambasIDE" Like "{alma,GambasIDE,szilva,Gambas,otto}"
Output: True 

*Actually, any "g" in the list, before "GambasIDE", will interfere with the
match:*

Print "GambasIDE" Like "{alma,g,szilva,GambasIDE,otto}" 
Output: False

but:

Print "GambasIDE" Like "{alma,szilva,otto,GambasIDE,g}" 
Output: True

It is only the *first letter* in the "Pattern" that is a problem -- the
other letters do not have any bad effect.  If we delete the "g" from the
word "Gambas", the result is correct:

Print "GambasIDE" Like "{alma,ambas, ambasIDE,szilva,GambasIDE,otto}" 
Output: True 

*Note that if you use the "*" symbol, it eliminates the problem:*

Print "GambasIDE" Like "*{alma,Gambas,szilva,GambasIDE,otto}*"
Output: True

*....*  eliminates the sensitivity of the patterns to their location in the
list.

Regards,
Jon




--
View this message in context: http://gambas.8142.n7.nabble.com/Issue-485-in-gambas-Like-square-brackets-problem-tp44870p44872.html
Sent from the gambas-user mailing list archive at Nabble.com.




More information about the User mailing list