BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

kregex_replace - replace an input string given a regular expression input and output string

LIBRARY CALL

char *kregex_replace(
   char *istr,
   char *src_pat,
   char *replace_pat,
   char *ostr)

INPUT

OUTPUT

RETURN VALUE

NULL on failure, the newly replaced string on success

DESCRIPTION

Replace an input string given a regular expression input and output string. This routine is used to do regular expression substitution given the source and destination patterns as replacement. So for example if the input string is: Old Man in an Old Boat and the source pattern is: ^Old and the replace pattern is: Young then the output would be:

Young Man in an Old Boat

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/objects/library/kutils/src/regex.c

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.