If you intend to generate C source code, consider the library
pcre
that strives to provide Perl-compatible regular expressions.
It is far more powerful than the POSIX regular expression library. And it is more adapted because you start with perl
regexes to begin with.
-- stefp