Pre-compile regexp.

(Thanks steph)