|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.percederberg.grammatica.parser.re.RegExp
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(java.lang.String pattern)
Creates a new regular expression. |
|
| Method Summary | |
Matcher |
matcher(CharBuffer str)
Creates a new matcher for the specified string. |
Matcher |
matcher(java.lang.String str)
Creates a new matcher for the specified string. |
Matcher |
matcher(java.lang.StringBuffer str)
Creates a new matcher for the specified string. |
java.lang.String |
toString()
Returns a string representation of the regular expression. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RegExp(java.lang.String pattern)
throws RegExpException
pattern - the regular expression pattern
RegExpException - if the regular expression couldn't be
parsed correctly| Method Detail |
public Matcher matcher(CharBuffer str)
str - the string to work with
public Matcher matcher(java.lang.String str)
str - the string to work with
public Matcher matcher(java.lang.StringBuffer str)
str - the string to work with
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||