I think for libc TRE is the way to go. But still, PCRE is a good candidate for base system so that tools, like grep can have Perl-syntax support, as well. And this work could serve to review TRE algorithms and maybe improve them. TRE is also BSD-licensed and very well documented in the author’s MSc thesis.