If you want to fix this on InspIRCd v3 there is a backported module in inspircd-contrib for PCRE2 which can be installed with `./modulemanager install m_regex_pcre2`. This module uses the same internal name so it can be used on the same network as a server using m_regex_pcre.
Alternately, you can just ship a different regex backend instead. I'd personally recommend m_regex_stdlib as that requires no dependencies other than a C++11 compiler. ~ Sadie