Closed robertwerner67 closed 1 year ago
Hi @robertwerner67,
First of all, I'm sorry for the long time it took me to answer your question.
Look-behind, look-ahead, named groups, non-greedy quantifiers and other modern regex metacharacters are not supported by txt2regex.
Being a "wizard", that tries to be simple and friendly to regex newcomers, it supports only a subset of all the regex power available in the engines.
Those are the supported metacharacters:
. [] [^] * + ? {} | ()
I'm not opposed to growing that list, but currently there are no plans on doing it.
For a few days, I use txt2regex (version 0.9) successfully to write regular expressions from the left to the right. As noticed in expressions written by a colleague, these assertions equally may check of what is written prior to the position initially checked, e.g., the negative look-behind
(?<!e)s
which would identify instances ofs
trailingi
(like in fish), and skips
trailinge
like in test.My question: are these look-behinds already implemented txt2regex, or maybe foreseen to be implemented in a later version of this very useful program?