Hi, I looked at the posts in the link you provided. one of the scenarios looks like exponential explosion when using alternations improperly (metioned in OReilly's book "Mastering Regular Exprssions" by J. Friedl). One of the solutions might be "unfolding" the alternations by using the following pattern: