Match lazily in regexes.

This is to prevent inconsistent matching behavior in 2.x vs 3.x.