Add regex optimizations (greedy/lazy/possessive).
Remove over-constraining test.
Minor formatting stuff.