*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> re_exec (3)              



NAME    [Toc]    [Back]

       re_comp, re_exec - Handle regular expressions

SYNOPSIS    [Toc]    [Back]

       #include <regex.h>

       char *re_comp(
               char *string ); int re_exec(
               char *string );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       re_comp(), re_exec():  XPG4-UNIX

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Points to the string that is to be matched or converted.

DESCRIPTION    [Toc]    [Back]

       The  re_comp() function converts a string into an internal
       form suitable for pattern matching. The re_exec() function
       compares  the  string  pointed  to by the string parameter
       with the last string passed to the re_comp() function.

       When the re_comp() function is passed a value of 0  (zero)
       or  NULL, the regular expression currently being converted
       remains unchanged.

       Strings passed to both the re_comp() and  re_exec()  functions
  may  have  trailing or embedded newline characters;
       however, these strings are terminated by a zero byte.

       The re_comp() and re_exec() functions support simple regular
  expressions,  which are defined in the grep(1) reference

NOTES    [Toc]    [Back]

       The re_comp() and re_exec() interfaces are scheduled to be
       withdrawn from a future version of the X/Open CAE Specification.

       These interfaces are  obsolete;  they  are  guaranteed  to
       function properly only in the C/POSIX locale and should be
       avoided. Use the POSIX regcomp()  interface  in  place  of
       re_comp() and re_exec().

RETURN VALUES    [Toc]    [Back]

       The  re_comp()  function  returns a value of 0 (zero) when
       the string pointed to by the string parameter is  successfully
  converted;  otherwise,  an  error message string is

       Upon successful completion, the re_exec() function returns
       a  value  of 1 if string matches the last compiled regular
       expression. Otherwise, the re_exec()  function  returns  a
       value  of 0 (zero), if string fails to match the last compiled
 regular expression, and a value of -1, if  the  compiled
  regular expression is invalid (indicating an internal

SEE ALSO    [Toc]    [Back]

       Functions: regcomp(3)

       Commands: grep(1)

       Standards: standards(5)

[ Back ]
 Similar pages
Name OS Title
perlre IRIX Perl regular expressions
perlre OpenBSD Perl regular expressions
re_format FreeBSD POSIX 1003.2 regular expressions
perlreref OpenBSD Perl Regular Expressions Reference
perlretut OpenBSD Perl regular expressions tutorial
re_format OpenBSD POSIX 1003.2 regular expressions
regex Linux POSIX 1003.2 regular expressions
perlrequick OpenBSD Perl regular expressions quick start
regcomp IRIX X/Open regular expressions definition and interface
perlfaq6 OpenBSD Regular Expressions ($Revision: 1.6 $, $Date: 2003/12/03 03:02:44 $)
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service