PerCederberg.Grammatica.Parser.RE
Class RegExp
System.Object
|
+--RegExp
in RegExp.cs
- class RegExp
- extends System.Object
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.
|
Constructor Summary |
RegExp( string pattern )
Creates a new regular expression. |
|
Method Summary |
|
href="../PerCederberg.Grammatica.Parser.RE/Matcher.html">Matcher Matcher( string str )
Creates a new matcher for the specified string. |
override string |
ToString()
Returns a string representation of the regular expression. |
RegExp
public RegExp( string pattern );
- Creates a new regular expression.
- Parameters:
pattern - the regular expression pattern
- Throws:
RegExpException - if the regular expression couldn't be
parsed correctly
Matcher
public Matcher Matcher( string str );
- Creates a new matcher for the specified string.
- Parameters:
str - the string to work with
- Returns:
- the regular expresion matcher
ToString
public override string ToString();
- Returns a string representation of the regular expression.
- Returns:
- a string representation of the regular expression