RE2 is an efficient, principled regular expression library that has been used in production at Google and many other places since 2006. Safety is RE2's primary goal. RE2 was designed and implemented with an explicit goal of being able to handle regular expressions from untrusted users without risk. One of its primary guarantees is that the match time is linear in the length of the input string. It

