diff --git a/docs/changes.txt b/docs/changes.txt index d6958e51dd..c089de2cd1 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -12,9 +12,9 @@ INCOMPATIBLE CHANGES SINCE 3.0.x: Changes in behaviour not resulting in compilation errors -------------------------------------------------------- -- wxRegEx now uses PCRE library, changing the meaning of some exotic regular - expressions using wxRE_ADVANCED syntax, please see its documentation for more - details. +- wxRegEx now uses PCRE library, changing the meaning of some regular + expressions, please see the "Changes" section in wxRegEx documentation for + more details. - wxRibbonButtonBar::DeleteButton() now deletes and not just removes the button. diff --git a/interface/wx/regex.h b/interface/wx/regex.h index 2578fd9723..b16dcec97e 100644 --- a/interface/wx/regex.h +++ b/interface/wx/regex.h @@ -184,7 +184,14 @@ enum - Backslash can be used to escape the character following it even inside square brackets now, while it loses its special meaning in POSIX regexes - when it occurs inside square brackets. + when it occurs inside square brackets. In particular, @c "\\]" escapes + the special meaning of the closing bracket, and so does @e not close the + character class. Please use @c "\\\\]" instead. + + - Closing parenthesis without a matching open parenthesis is now a syntax + error instead of just being treated as a literal. To fix possible errors + due to it, escape parenthesis that are supposed to be taken literally + with a backslash, i.e. use @c "\\)" in C strings. - For completeness, PCRE syntax which previously resulted in errors, e.g. @c "(?:...)" and similar constructs, are now accepted and behave as