Page 1 of 1
Regex. No classes between [].
Posted: Wed Jan 02, 2008 12:52 am
by Hroudtwolf
Hi,
I don't know it's a bug or a missing feature.
But classes between [] are not working with pb-regex.
[:xdigit:]
[:alnum:]
[:ascii:]
[:alpha:]
Is it a bug or different defined?
MfG
Wolf
Posted: Wed Jan 02, 2008 1:44 am
by freak
IIRC they only work within a character class (so inside another []). This works:
Code: Select all
If CreateRegularExpression(0, "[[:alpha:]]")
Debug MatchRegularExpression(0, "a")
Debug MatchRegularExpression(0, "1")
FreeRegularExpression(0)
Else
Debug "Error: " + RegularExpressionError()
EndIf
Try the RegularExpressionError() if something isn't working as you expect, it is there to tell you why
btw, PB uses the PCRE library (BSD license). The documentation can be found here:
http://www.pcre.org/pcre.txt
Posted: Wed Jan 02, 2008 4:06 am
by Hroudtwolf
Cool. Thanks for the fast answer.
Best regards
Wolf