A lot of "regular expressions" are just text searches, or can be, and then you can use aho-corasick - which is implemented in many languages, and check a few regular expressions for the ones that really are.

Sure, nor perfect, but works surprisingly well.