If a regex runs too long just kill it and show the user an error.
How often have you encountered code that adds a timeout to regex matching?
How often have you encountered code that adds a timeout to regex matching?