Grammatica
Public Member Functions | List of all members
PerCederberg.Grammatica.Runtime.RE.RegExp Class Reference

A regular expression. More...

Public Member Functions

 RegExp (string pattern)
 Creates a new case-sensitive regular expression. More...
 
 RegExp (string pattern, bool ignoreCase)
 Creates a new regular expression. More...
 
Matcher Matcher (string str)
 Creates a new matcher for the specified string. More...
 
Matcher Matcher (ReaderBuffer buffer)
 Creates a new matcher for the specified look-ahead character input stream. More...
 
override string ToString ()
 Returns a string representation of the regular expression. More...
 

Detailed Description

A regular expression.

This class creates and holds an internal data structure representing a regular expression. It also allows creating matchers. This class is thread-safe. Multiple matchers may operate simultanously on the same regular expression.

Author
Per Cederberg
Version
1.5

Constructor & Destructor Documentation

PerCederberg.Grammatica.Runtime.RE.RegExp.RegExp ( string  pattern)
inline

Creates a new case-sensitive regular expression.

Parameters
patternthe regular expression pattern
Exceptions
RegExpExceptionif the regular expression couldn't be parsed correctly
PerCederberg.Grammatica.Runtime.RE.RegExp.RegExp ( string  pattern,
bool  ignoreCase 
)
inline

Creates a new regular expression.

The regular expression can be either case-sensitive or case-insensitive.

Parameters
patternthe regular expression pattern
ignoreCasethe character case ignore flag
Exceptions
RegExpExceptionif the regular expression couldn't be parsed correctly
Since
1.5

Member Function Documentation

Matcher PerCederberg.Grammatica.Runtime.RE.RegExp.Matcher ( string  str)
inline

Creates a new matcher for the specified string.

Parameters
strthe string to work with
Returns
the regular expresion matcher
Matcher PerCederberg.Grammatica.Runtime.RE.RegExp.Matcher ( ReaderBuffer  buffer)
inline

Creates a new matcher for the specified look-ahead character input stream.

Parameters
bufferthe character input buffer
Returns
the regular expresion matcher
Since
1.5
override string PerCederberg.Grammatica.Runtime.RE.RegExp.ToString ( )
inline

Returns a string representation of the regular expression.

Returns
a string representation of the regular expression

The documentation for this class was generated from the following file: