3 ms·
In the very first section (albeit after from introduction, but still before the Tarzan example you show), it clearly states the limitations: > Before we procee
by ehsankia 5y ago
In the very first section (albeit after from introduction, but still before the Tarzan example you show), it clearly states the limitations:
> Before we proceed, I should point out some limitations of the technique:
The author clearly states you may have to add one or two extra line of code, in your case regex.test(string) may become `regex.match(string).group(1).length` > 0 or something along those lines.
The author explicitly states:
> so it will not work in a non-programming environment, such as a text editor's search-and-replace function or a grep command.
But in a programming environment, I will choose to have one more line of code over the extremely hard to read alternative regexes.