search_and_replace
int search_and_replace(pattern_t *, int, int);
if (search_and_replace(pat, sgflag, sgnum) < 0)