|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.impl.xpath.regex.RegularExpression
A regular expression matching engine using Non-deterministic Finite Automaton (NFA). This engine does not conform to the POSIX regular expression.
RegularExpression re = new RegularExpression(regex); if (re.matches(text)) { ... }
RegularExpression re = new RegularExpression(regex);
Match match = new Match();
if (re.matches(text, match)) {
... // You can refer captured texts with methods of the Match
class.
}
RegularExpression re = new RegularExpression(regex, "i"); if (re.matches(text) >= 0) { ...}
You can specify options to RegularExpression(
regex,
options)
or setPattern(
regex,
options)
.
This options parameter consists of the following characters.
"i"
"m"
"s"
"u"
"w"
","
"X"
match()
method does not do subsring matching
but entire string matching.
Differences from the Perl 5 regular expression
|
Meta characters are `. * + ? { [ ( ) | \ ^ $'.