PCRE - Perl Compatible Regular Expressions
Link with the pcre, and you can use the same Perl expressions to match things in your C code, as you do in your Perl code.

There's a bit of book keeping...