Bash regexes

Bash now (v4.1.5) does special parser trickery with the argument to =~. The easiest way to work with this is to put the regular expression into its own environment variable. e.g. to get the SMTP transaction ID from an exim log