I think for libc TRE is the way to go. But still, PCRE is a good can­di­date for base sys­tem so that tools, like grep can have Perl-syntax sup­port, as well. And this work could serve to review TRE algo­rithms and maybe improve them. TRE is also BSD-licensed and very well doc­u­ment­ed in the author’s MSc thesis.