Add regex helper to handle backtracking attacks
Currently, there are a few regexes present in our code that could technically lead to a specifically formulated string to attack our services. The risk of this is somewhat low, but we should address this by adding timeouts and limits to better handle these cases.