Consider the following Posix RegExp and search text:
Regex: [a\]]+
Text: baa[aa]aab
I would expect the regex to match aa]aa, but for some reason it matches a] instead. I think it's because TextPad doesn't recognise \]. If this is the case, then it's a bug.
Does anyone know how to solve/workaround this problem?
Posix search for ] in brackets
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
and it is documented
Help - Help Topics - Reference Information - Regular Expressions
then scroll down to Class expressions.
It says under Simple Characters:
To match a right square bracket (]), it must be the first character of the class expression, after any initial circumflex (see Negated Class Expressions).
Help - Help Topics - Reference Information - Regular Expressions
then scroll down to Class expressions.
It says under Simple Characters:
To match a right square bracket (]), it must be the first character of the class expression, after any initial circumflex (see Negated Class Expressions).