www.delorie.com/gnu/docs/glibc/libc_153.html   search  
 
Buy the book!


The GNU C Library

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.3 Regular Expression Matching

The GNU C library supports two interfaces for matching regular expressions. One is the standard POSIX.2 interface, and the other is what the GNU system has had for many years.

Both interfaces are declared in the header file `regex.h'. If you define _POSIX_C_SOURCE, then only the POSIX.2 functions, structures, and constants are declared.

10.3.1 POSIX Regular Expression Compilation  Using regcomp to prepare to match.
10.3.2 Flags for POSIX Regular Expressions  Syntax variations for regcomp.
10.3.3 Matching a Compiled POSIX Regular Expression  Using regexec to match the compiled pattern that you get from regcomp.
10.3.4 Match Results with Subexpressions  Finding which parts of the string were matched.
10.3.5 Complications in Subexpression Matching  Find points of which parts were matched.
10.3.6 POSIX Regexp Matching Cleanup  Freeing storage; reporting errors.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003