prevent catastrophic backtracing when doing regexes