Speed optimization by precompiling regexes wherever possible

Got the reply delay on the default brain down from 0.19s to 0.04s!