dirac injection function
Merge pull request #1053 from nremond/dirac

Dirac injection function
Minor clean up
Add optional (enabled by default) regex cache, close #1054