My C is a bit shaky, but I've looked at python's source code and it looks like most of python's re
module is implemented by state machines. This comes as no surprise since regular expressions can be reduced to deterministic finite state machines.
I imagine other regex implementations are similar. But few, if any, modern regex implementations are regular according to the textbook definition. Then how do they account for irregularity, like backreferences?
(.*)\1 // this is not regular