Fixed #23
Lazily initialize regexes only when needed.