|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPRegex
public class XPRegex
Represents A Regular Expression object. The pattern string represented by this regular expression object should be conforming to the Perl5 regular expression syntax, because the underlying Java class only allow for such pattern strings.
Field Summary | |
---|---|
static int |
DEFAULT_OPTION
Perl5 regular expression default case. |
static int |
IGNORE_CASE
Perl5 regular expression ignore case. |
Constructor Summary | |
---|---|
XPRegex(java.lang.String pattern)
Initializes and compiles an instance of the XPRegex class for the specified regular expression. |
|
XPRegex(java.lang.String pattern,
int flags)
Initializes and compiles an instance of the XPRegex class for the specified regular expression. |
Method Summary | |
---|---|
boolean |
IsMatch(java.lang.String input)
Indicates whether the regular expression finds a match in the input string. |
static boolean |
IsMatch(java.lang.String input,
java.lang.String pattern)
Indicates whether the regular expression finds a match in the input string. |
XPMatch |
Match(java.lang.String input)
Searches an input string for an occurrence of a regular expression and returns the first Match found. |
static XPMatch |
Match(java.lang.String input,
java.lang.String pattern)
Searches an input string for an occurrence of a regular expression and returns the first Match found. |
XPMatch[] |
Matches(java.lang.String input)
Searches an input string for all occurrences of a regular expression and returns all the successful matches. |
static XPMatch[] |
Matches(java.lang.String input,
java.lang.String pattern)
Searches an input string for all occurrences of a regular expression and returns all the successful matches. |
java.lang.String |
toString()
Returns the regular expression pattern that was passed into the XPRegex constructor. |
java.lang.String |
ToString()
Returns the regular expression pattern that was passed into the XPRegex constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int IGNORE_CASE
public static final int DEFAULT_OPTION
Constructor Detail |
---|
public XPRegex(java.lang.String pattern, int flags)
pattern
- The regular expression pattern to match.
The string should be conforming to the Perl5 regular expression syntaxflags
- A boolean specifies if the regular expression
should be matched case-insensitively
XPIllegalArgumentException
- If pattern does not conform to
Perl5 regular expression syntaxpublic XPRegex(java.lang.String pattern)
pattern
- The regular expression pattern to match.
The string should be conforming to the Perl5 regular expression syntax
XPIllegalArgumentException
- If pattern does not conform to
Perl5 regular expression syntaxMethod Detail |
---|
public boolean IsMatch(java.lang.String input)
input
- The input string to test for a match.
public static boolean IsMatch(java.lang.String input, java.lang.String pattern)
input
- The input string to test for a match.pattern
- The regular expression pattern to match. The string should be
conforming to the Perl5 regular expression syntax
XPIllegalArgumentException
- If pattern does not conform to the
Perl5 regular expression syntaxpublic XPMatch Match(java.lang.String input)
input
- The input string to test for a match.
public static XPMatch Match(java.lang.String input, java.lang.String pattern)
input
- The input string to test for a match.pattern
- The regular expression pattern to match. The string should be
conforming to the Perl5 regular expression syntax.
XPIllegalArgumentException
- If pattern does not conform to
Perl5 regular expression syntaxpublic XPMatch[] Matches(java.lang.String input)
input
- The input string to test for a match.
public static XPMatch[] Matches(java.lang.String input, java.lang.String pattern)
input
- The input string to test for a match.pattern
- The regular expression pattern to match. The string should be
conforming to the Perl5 regular expression syntax.
public java.lang.String ToString()
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 |