Hmm, there's a reduction of 3-cnf-sat to perl regexps, making them NP-complete. As CFGs are in NP...
https://perl.plover.com/NPC/NPC-3SAT.html
https://www.pcre.org/original/doc/html/pcrepattern.html#SEC2...
\( ( [^()]++ | (?R) )* \)
Hmm, there's a reduction of 3-cnf-sat to perl regexps, making them NP-complete. As CFGs are in NP...
https://perl.plover.com/NPC/NPC-3SAT.html