bugfix regex infinite loop and resource eating
Merge pull request #217 from lipedjow/master

bugfix regex infinite loop and resource eating