in reply to FrameMaker and Perl

Given that the API is C functions and structures, you might be better off using C's regular expression package. Contrary to common perception, there areregular expressions available for C, though of course they aren't as robust or flexible as Perl's regular expressions. Still, they may be enough for what you need. Check out libgen.h, regcmp, and regex if you are using Unix. If you can find a copy of David A. Curry's UNIX Systems Programming for SVR4 from O'Reilly, it has a small discussion of them. I'm sure they exist on other OSes, but my knowledge of those systems is limited.

--
tbone1, YAPS (Yet Another Perl Schlub)
And remember, if he succeeds, so what.
- Chick McGee