re2s RE2 is a regular expression engine that runs in time linear in the size of the input. RE2S is a port of RE2 to pure Scala.