[Gambas-user] LIKE character scaping
Benoit Minisini
gambas at ...1...
Thu Sep 9 10:54:59 CEST 2004
On Thursday 09 September 2004 03:19, phiber wrote:
> I can't scape special characters with LIKE, even the help's example
> PRINT "Gambas" LIKE "G[Aa]\*" doesn't work ("Bad character constant in
> string"). Any suggestion?
>
PRINT "Gambas" LIKE "G[Aa]\\*"
Because the '\' character is used for escaping characters in the string, AND
for escaping special characters in the pattern. So you must double it.
Or you can use this syntax:
PRINT "Gambas" LIKE "G[Aa][*]"
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list