Cache regex objects

Regex's that are used more than once should be cached for performance purposes.

https://blogs.oracle.com/greimer/entry/pre_compile_and_cache_yer
http://upshots.org/actionscript/jsas-cache-your-regexp