Best a new thread with full benchmark. Too much guessing needed...
And consider
use Scalar::Util qw(looks_like_number);
In reply to Re^7: Regex question - identify which pattern comes first
by Anonymous Monk
in thread Regex question - identify which pattern comes first
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |