[Somewhat OT]

In general, I would be very wary of any regex that has an unbounded
quantifier like +, * or {32000,}

If all you care about is matching something followed by *at least* 32000
copies of something else, you should use:

       /something(?:something_else){32000}/

After all, once you see 32000 of them, you don't care if there could be
10 million more of them.  When you craft regexes, you should always consider
their behaviour on pathological cases like 50MB text emails.

Another option is to use non-greedy quantifiers, but I prefer upper bounds
on quantifiers.

Regards,

David.

Reply via email to