>>545
適当にググッた。嫁。サンプルコードだけ読めば簡単に分かる。

regex.h

http://memo.majide.com/index.php?%A1%DAC%B8%C0%B8%EC%A1%DB%C0%B5%B5%AC%C9%BD%B8%BD
http://sometime.minidns.net/~ccgi/posix_regex.html

reglib.c ・・・ regcomp,regxec,regfree関数を使って、regsplit, regreplace, regrpall, regcnt関数を構築してる例

http://sometime.minidns.net/~ccgi/posix_reglib.html