I have built and tested wxfbe (version 10 oktober 2012).
Regular expression using wxSTC_FIND_POSIX was broken. Matching just
does not work when using that flag. As the code in regexp is basically
doing what wxSTC_FIND_POSIX does there is no need for wxSTC_FIND_POSIX.
I'd say dump wxSTC_FIND_POSIX as your code is already taking
care of things (keep wxSTC_FIND_REGEXP).
The shortcut changes (\w ==> [a-zA-Z0-9_]) work well but there
is a problem.
When matching using a class (say [a-zA-Z]+) the search routine
may come up with "dim" (dim also gets selected). When pressing search again
the search routine comes up with "im" (that's the previous dim with the d).
Which is not wrong (im does match [a-zA-Z+]) but that's not what you want.
Let's assume dim and im count as separate matches. When doing a search-replace the
replacement will first operate on dim, then on im. And that is not right. The regex should
just select the longest possible match and use that in
the find-replace (and not use the longest match and all possible smaller matches within that
The search should continue after the first (and longest) match (dim). So the first
match is okay but searching should continue at the first position after the
first search result (and not one position after the first character of the
For some reason I do not seem to be able to use ? in combination with grouping.
I tried matching something like (sub)?\s+\w+ but that did not match a thing.
Changing it to sub\s+\w+ did match. Grouping does not work as it does with
other regex engines (it's a scintilla problem I guess).
Any project using scintilla implements it's own brand of regular expression matching
(replacing the built-in regex engine). It's like the scintilla devs put it:
The regular expression support is limited and should only be used for simple cases and initial development
wxfbe is in it's early stages of development so that seems to fit the above description. Character class
abbreviations (\w \s \d \W \S \D) and the use of () instead of \(\) are features that can be added
to scintilla without having to replace the current regex engine. But somewhere in the future of wxfbe
development someone has to replace the built-in regex engine with a proper one (regex support in most if not all
'mature' source code editors is good).