The canonical Perl-compatible regexp library is PCRE, available at
http://www.pcre.org. It's a substantial body of code, as you might expect from Perl compatibility. I wouldn't want to have to bring it up under PocketC.
I suggest that you forget about Perl compatibility
(or even POSIX.2 compatibility
), download the /old/ version of Spencer's regexp library from ftp://ftp.zoo.toronto.edu/pub/regexp.old.tar.Z, study it carefully, then try to bring it up in PocketC. While this code is hairy, it's still much simpler than more recent versions of the library.
Good luck.
Ben