RE2 is a regular expression engine designed to operate in time proportional to the size of the input, ensuring linear time complexity. RE2JS, on the other hand, is a pure JavaScript port of the RE2 library — more specifically, it's a port of the RE2/J library. JavaScript standard regular expression package, RegExp, and many other widely used regular expression packages such as PCRE, Perl and Pytho