|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
com.bramosystems.oss.player.util.client.RegExp
public class RegExp
Utility class for regular expressions
Nested Class Summary | |
---|---|
static class |
RegExp.RegexException
Thrown to indicate a regular expression related exception |
static class |
RegExp.RegexResult
The RegExpResult wraps the result of the search performed by the exec(java.lang.String)
method |
Constructor Summary | |
---|---|
protected |
RegExp()
Create a new RegExp object |
Method Summary | |
---|---|
RegExp.RegexResult |
exec(String exp)
Performs a search for the regular expression on the specified exp |
int |
getLastIndex()
Returns the index position at which the next search starts. |
static RegExp |
getRegExp(String pattern,
String flags)
Returns a RegExp instance for the specified pattern and flags. |
String |
getSource()
Returns the pattern of the regular expression |
boolean |
isGlobal()
Checks if this RegExp object performs a global match. |
boolean |
isIgnoreCase()
Checks if this RegExp object performs a match without case sensitivity |
boolean |
isMultiline()
Checks if this RegExp object performs multiline matching. |
void |
setLastIndex(int lastIndex)
Sets the index position at which to start the next search. |
boolean |
test(String exp)
Tests for the match of the regular expression in the specified exp . |
Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
---|
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected RegExp()
Method Detail |
---|
public static final RegExp getRegExp(String pattern, String flags) throws RegExp.RegexException
The flags can include the following:
pattern
- the pattern of the regular expressionflags
- the modifiers of the expression
RegExp.RegexException
- if any error occurs, such as invalid flagspublic final boolean isGlobal()
true
if the global property is set, false
otherwisepublic final boolean isIgnoreCase()
true
if the ignoreCase property is set, false
otherwisepublic final boolean isMultiline()
true
if the multiline property is set, false
otherwisepublic final int getLastIndex()
setLastIndex(int)
public final void setLastIndex(int lastIndex)
exec(java.lang.String)
and test(java.lang.String)
methods.
lastIndex
- the new index positionpublic final String getSource()
pattern
of the regular expression
pattern
of the regular expressionpublic final boolean test(String exp)
exp
.
true
if there is a match, false
otherwisepublic final RegExp.RegexResult exec(String exp) throws RegExp.RegexException
exp
exp
- the string to search
RegExp.RegexException
- if there is no match
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |