## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# csutil/regexp.h File Reference

Regular expressions support. More...

`#include "csextern.h"`
`#include "csutil/array.h"`

Go to the source code of this file.

## Classes

struct | csRegExpMatch
| Information about (sub)expression matches. More...
class | csRegExpMatcher
| Matcher for regular expressions. More...

## Enumerations

enum | csRegExpMatchError { csrxNoError, csrxNoMatch, csrxBadBraces, csrxBadPattern, csrxBadRepetition, csrxErrCollate, csrxErrCharType, csrxErrEscape, csrxErrSubReg, csrxErrBrackets, csrxErrParentheses, csrxErrBraces, csrxErrRange, csrxErrSpace, csrxErrUnknown }
| Possible errors that can occur during matching. More...
enum | csRegExpMatchFlags { csrxIgnoreCase = 1, csrxNewLine = 2, csrxNotBOL = 4, csrxNotEOL = 8 }
| Flags for regular expression matching. More...

## Detailed Description

Regular expressions support.

Definition in file regexp.h.

## Enumeration Type Documentation

enum csRegExpMatchError

Possible errors that can occur during matching.

Enumerator:

  csrxNoError | No problems during matching.
  csrxNoMatch | The pattern didn't match the string.
  csrxBadBraces | There was an invalid `\{`. ..\} construct in the regular expression. A valid `\{`...\} construct must contain either a single number, or two numbers in increasing order separated by a comma.
  csrxBadPattern | There was a syntax error in the regular expression.
  csrxBadRepetition | A repetition operator such as ? or * appeared in a bad position (with no preceding subexpression to act on).
  csrxErrCollate | The regular expression referred to an invalid collating element (one not defined in the current locale for string collation).
  csrxErrCharType | The regular expression referred to an invalid character class name.
  csrxErrEscape | The regular expression ended with `\`.
  csrxErrSubReg | There was an invalid number in the `\digit` construct.
  csrxErrBrackets | There were unbalanced square brackets in the regular expression.
  csrxErrParentheses | An extended regular expression had unbalanced parentheses, or a basic regular expression had unbalanced `\`( and `\`).
  csrxErrBraces | The regular expression had unbalanced `\{` and `\}`.
  csrxErrRange | One of the endpoints in a range expression was invalid.
  csrxErrSpace | Out of memory.
  csrxErrUnknown | Unknown error.

Definition at line 32 of file regexp.h.

enum csRegExpMatchFlags

Flags for regular expression matching.

Enumerator:

  csrxIgnoreCase | Ignore case when matching letters.
  csrxNewLine | Treat a newline in string as dividing string into multiple lines, so that `$` can match before the newline and `^` can match after. Also, don't permit ``. to match a newline, and don't permit ``[^...] to match a newline. Otherwise, newline acts like any other ordinary character.
  csrxNotBOL | Do not regard the beginning of the specified string as the beginning of a line; more generally, don't make any assumptions about what text might precede it.
  csrxNotEOL | Do not regard the end of the specified string as the end of a line; more generally, don't make any assumptions about what text might follow it.

Definition at line 100 of file regexp.h.