Alternatively, sexeger points out the approach of reversing the input and then taking the first four non-dash/dots characters, which should also happen without much backtracking.
In reply to Re^2: why this regular expression is so slow?
by Corion
in thread why this regular expression is so slow?
by fnever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |