mark@ria-emh2.army.mil (Mark D. McKamey IM SA) (11/14/89)
Hello All, I am in the process of porting a Berkeley BSD 4.2 C program to USG 5.2. Can anyone tell me what the functions "re_comp" and "re_exec" perform? Has anyone written equivalent functions for USG 5.2 UNIX? If so, please e-mail me copies. Thank You. Mark D. McKamey <mark@ria-emh2.army.mil> HQ AMCCOM, ASQNC-ARI-TW, ATTN: Mark McKamey, Rock Island, IL 61299-7210 COMMERCIAL: (309) 782-4503 AUTOVON: 793-4503 uunet.uu.net!ria-emh2.army.mil!mark
ron@woan.austin.ibm.com (Ronald S. Woan) (11/15/89)
In article <21440@adm.BRL.MIL>, mark@ria-emh2.army.mil (Mark D. McKame writes: > I am in the process of porting a Berkeley BSD 4.2 C program to USG 5.2. > Can anyone tell me what the functions "re_comp" and "re_exec" perform? > Has anyone written equivalent functions for USG 5.2 UNIX? If so, please > e-mail me copies. Thank You. Here's the man description of the two functions (both under REGEX(3) in the man pages). char *re_comp(s) re_execs(s) char *s; char *s; Re_comp compiles a string into an internal form suitable for pattern matching. Re_exec checks the argument string against the last string passed to re_comp. Re_comp returns 0 if it is successful. If passed a 0 or null string, it will not update the currently compiled expression. Re_exec returns 1 if string s matches the last compiled expression, 0 if it does not, and -1 if the last compiled expression is invalid. Sys V implementations can be found in the source for GNU EMACS and Perl, but they are covered by the GNU copyleft naturally, so you can't use them in commercial applications... Anyways, its not too difficult to write you own. Ron +-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+ +------------------------------My Employer----------------------------------+ + Ronald S. Woan (IBM VNET)WOAN AT AUSTIN, (AUSTIN)ron@woan.austin.ibm.com + + outside of IBM @cs.utexas.edu:ibmaus!auschs!woan.austin.ibm.com!ron + + last resort woan@peyote.cactus.org +