Fix an infinite loop in Gitlab:UntrustedRegexp See merge request !2146
24570 use re2 for user supplied regexp 9 3 See merge request !2129