public class JsRegExp extends Object
| Modifier and Type | Method and Description |
|---|---|
static JsRegExp |
compile(String pattern)
Creates a regular expression object from a pattern with no flags.
|
static JsRegExp |
compile(String pattern,
String flags)
Creates a regular expression object from a pattern using the given flags.
|
MatchResult |
exec(String input)
Applies the regular expression to the given string.
|
boolean |
getGlobal()
Returns whether the regular expression captures all occurrences of the pattern.(
|
boolean |
getIgnoreCase()
Returns whether the regular expression ignores case.
|
int |
getLastIndex()
Returns the zero-based position at which to start the next match.
|
boolean |
getMultiline()
Returns whether '$' and '^' match line returns ('\n' and '\r') in addition to the beginning or end of the string.
|
String |
getSource()
Returns the pattern string of the regular expression.
|
String |
replace(String input,
String replacement)
Returns the input string with the part(s) matching the regular expression replaced with the replacement string.
|
void |
setLastIndex(int lastIndex)
Sets the zero-based position at which to start the next match.
|
SplitResult |
split(String input)
Splits the input string around matches of the regular expression.
|
SplitResult |
split(String input,
int limit)
Splits the input string around matches of the regular expression.
|
boolean |
test(String input)
Determines if the regular expression matches the given string.
|
public static JsRegExp compile(String pattern)
public static JsRegExp compile(String pattern, String flags)
public MatchResult exec(String input)
public boolean getGlobal()
public boolean getIgnoreCase()
public int getLastIndex()
public boolean getMultiline()
public String getSource()
public String replace(String input, String replacement)
public void setLastIndex(int lastIndex)
public SplitResult split(String input)
public SplitResult split(String input, int limit)
public boolean test(String input)
Copyright © 2012-2015. All Rights Reserved.