Merge pull request #1414 from ylavic/regex_allocator

Use passed in allocator for internal regex parser.