You can get newer versions of GNU regex, our regular expression matcher, from a GNU libc tarball. The files you need are posix/regex.c and posix/regex.h.