I am working in Perl, which uses a backtracking regex engine.
I need to match strings of whitespace-delimited tokens (I am parsing assembler in case anyone is wondering). I am currently using regexps like
The general approach is for any sub-expression that might do backtracking that you want to inhibit, surround the sub-expression with
\s+ would be
(?>\s+), for example.