Discussion:
[Notepad-plus-plus] Regex
Randall Fidler
2010-04-14 14:46:01 UTC
Permalink
Hello,



Just trying some simple Regex which I know work (using same string
and regex, pattern matches in other tools), one example would be
something like for "quit" find q(?=u) easy enough right? Well I'm
using the Regex Helper plugin, which is great by the way, and it's able
to find "q" in the example (and highlights u as non-capture match) so
all seems well but when I try to actually use the same regex in the
"find" function, it says it can't find anything. I'm curious how Regex
helper finds it without issue yet Find/Replace cannot? I also tried
Ctrl+R (whatever dialog that brings up) and it can't find anything
either.



Ideas? Is there something simple I'm missing?



Thanks!



Randall
John Kollar
2010-04-15 03:45:53 UTC
Permalink
Perhaps the look-ahead feature (i.e. "?=") is an extended feature that
is not present
in simple RegEx. Just speculating that the built in RegEx feature is
only simple RegEx,
while your plugin might be more fully featured. See, for instance, the
following
Wikipedia article on feature comparisons between regex libraries:

<http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines#Language_features>
Loading...