|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gwtwidgets.client.util.regex.Pattern
public class Pattern
Implementation of the java.util.regex.Pattern class with a
wrapper aroung the Javascript RegExp object.
As most of the methods delegate to the JavaScript RegExp object, certain differences in the
declaration and behaviour of regular expressions must be expected.
Please note that neither the java.util.regex.Pattern#compile(String) method nor
Matcher instances are supported. For the later, consider using match(String).
| Field Summary | |
|---|---|
static int |
CASE_INSENSITIVE
Declares that characters are matched reglardless of case. |
static int |
MULTILINE
Declares that regular expressions should be matched across line borders. |
| Constructor Summary | |
|---|---|
Pattern(java.lang.String pattern)
Class constructor |
|
Pattern(java.lang.String pattern,
int flags)
Class constructor |
|
| Method Summary | |
|---|---|
java.lang.String[] |
match(java.lang.String text)
This method is borrowed from the JavaScript RegExp object. |
boolean |
matches(java.lang.String text)
Determines wether a provided text matches the regular expression |
static boolean |
matches(java.lang.String regex,
java.lang.String input)
Determines wether the specified regular expression is validated by the provided input. |
java.lang.String |
pattern()
Returns the regular expression for this pattern |
static java.lang.String |
quote(java.lang.String input)
Escape a provided string so that it will be interpreted as a literal in regular expressions. |
java.lang.String[] |
split(java.lang.String input)
Split an input string by the pattern's regular expression |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MULTILINE
public static final int CASE_INSENSITIVE
| Constructor Detail |
|---|
public Pattern(java.lang.String pattern)
pattern - Regular expression
public Pattern(java.lang.String pattern,
int flags)
pattern - Regular expressionflags - | Method Detail |
|---|
public static boolean matches(java.lang.String regex,
java.lang.String input)
regex - Regular expressioninput - String to validate
true if matched.public static java.lang.String quote(java.lang.String input)
input -
public java.lang.String[] match(java.lang.String text)
text -
public boolean matches(java.lang.String text)
text -
public java.lang.String pattern()
public java.lang.String[] split(java.lang.String input)
input -
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 | |||||||||