RE_COMP(3) BSD Programmer's Manual RE_COMP(3) NNAAMMEE rree__ccoommpp, rree__eexxeecc - regular expression handler SSYYNNOOPPSSIISS ##iinncclluuddee <<uunniissttdd..hh>> _c_h_a_r _* rree__ccoommpp(_c_o_n_s_t _c_h_a_r _*_s); _i_n_t rree__eexxeecc(_c_o_n_s_t _c_h_a_r _*_s); DDEESSCCRRIIPPTTIIOONN This interface is made obsolete by regex(3). The rree__ccoommpp() function compiles a string into an internal form suitable for pattern matching. The rree__eexxeecc() function checks the argument string against the last string passed to rree__ccoommpp(). The rree__ccoommpp() function returns 0 if the string _s was compiled successful- ly; otherwise a string containing an error message is returned. If rree__ccoommpp() is passed 0 or a null string, it returns without changing the currently compiled regular expression. The rree__eexxeecc() function returns 1 if the string _s matches the last com- piled regular expression, 0 if the string _s failed to match the last com- piled regular expression, and -1 if the compiled regular expression was invalid (indicating an internal error). The strings passed to both rree__ccoommpp() and rree__eexxeecc() may have trailing or embedded newline characters; they are terminated by NULs. The regular ex- pressions recognized are described in the manual entry for ed(1), given the above difference. DDIIAAGGNNOOSSTTIICCSS The rree__eexxeecc() function returns -1 for an internal error. The rree__ccoommpp() function returns one of the following strings if an error occurs: No previous regular expression, Regular expression too long, unmatched \(, missing ], too many \(\) pairs, unmatched \). SSEEEE AALLSSOO ed(1), ex(1), egrep(1), fgrep(1), grep(1), regex(3) HHIISSTTOORRYY The rree__ccoommpp() and rree__eexxeecc() functions appeared in 4.0BSD. 4.4BSD June 4, 1993 1