It's been 2 or 3 weeks since I added timeout protection to the RegexLib.com site. During that period I've averaged 1 or 2 timed out patterns per day. I thought that I'd post a small selection of some which have caused timeout exceptions.
The following 9 samples show the pattern and the input string which caused the failure; for the last 3 I've just shown "{LARGE BODY OF TEXT}" instead of the actual text which, in each case was a large amount of Html source.
Pattern: ^[a-zA-Z0-9]+((.?|\-*)[a-zA-Z0-9]+)*$
Input string:
asdf.host-name.asd-f.
Pattern
^(([a-zA-Z\d!#$%&'*+-/=?^_`{|}~]+\x20*|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*"\x20*)*(?<angle><))?
((?!\.)(\.?[a-zA-Z\d!#$%&'*+-/=?^_`{|}~]+)+|"((?=[\x01-\x7f])[^"\\]|\\[\x01-\x7f])*")
@
(((?!-)[a-zA-Z\d\-]+(?<!-)\.)+[a-zA-Z]{2,}
|\[
(((?(?<!\[)\.)(25[0-5]|2[0-4]\d|[01]?\d?\d)){4}
|[a-zA-Z\d\-]*[a-zA-Z\d]:((?=[\x01-\x7f])[^\\\[\]]|\\[\x01-\x7f])+)
\])
(?(angle)>)$
Input string:
www42af43ds.afsd.fds.ds
Pattern
^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$
Input string:
hello23423423423424n@aol.c
Pattern
^((?:[a-zA-Z]:)|(?:\\{2}\w+)\$?)\\([^\\/:*?<>"| ](?:[^\\/:*?<>"|]*[^\\/:*?<>"| ])*\\)*((?:[^\\/:*?<>"|]*[^\\/:*?<>"| ])+\.(?:[^\\/:*?<>"|]*[^\\/:*?<>"| ]){2,15})?
Input string:
C:\RECYCLER\S-1-5-21-878277593-965038143-782984527-1002
Pattern
^\w{1}[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$
Input string:
gjlglujhL'KJK'LKJL'KLJKL-JKHKJHGK
Pattern
^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$
Input string:
michael.sumeranoscranton.edu
Pattern
(<table.*align=\"right\">)((\s*.*\s*)*?)(<table)((.*|\s*)*?)(</table>)
Input string:
{LARGE BODY OF TEXT}
Pattern
(<table.*align=\"right\">)((\s*.*\s*)*?)((\s*.*\s*)*?)(<table)((.*\s*)*?)(</table>)((\s*.*\s*)*?)(</table>)
Input string:
{LARGE BODY OF TEXT}
Pattern
(<table)((\s*.*\s*)*?).*(<FONT\sFACE=\"arial).*(Related\s Articles).+((\s*.*\s*)*?)(</table>)((\s*.*\s*)*?)(</table>)
Input string:
{LARGE BODY OF TEXT}