public interface RegexpMatcher
Modifier and Type | Field and Description |
---|---|
static int |
MATCH_CASE_INSENSITIVE
Perform a case insensitive match
|
static int |
MATCH_DEFAULT
Default Mask (case insensitive, neither multiline nor
singleline specified).
|
static int |
MATCH_MULTILINE
Treat the input as a multiline input
|
static int |
MATCH_SINGLELINE
Treat the input as singleline input ('.' matches newline)
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector |
getGroups(java.lang.String argument)
Returns a Vector of matched groups found in the argument
using default options.
|
java.util.Vector |
getGroups(java.lang.String input,
int options)
Get the match groups from this regular expression.
|
java.lang.String |
getPattern()
Get a String representation of the regexp pattern
|
boolean |
matches(java.lang.String argument)
Does the given argument match the pattern?
|
boolean |
matches(java.lang.String input,
int options)
Does this regular expression match the input, given
certain options
|
void |
setPattern(java.lang.String pattern)
Set the regexp pattern from the String description.
|
static final int MATCH_DEFAULT
static final int MATCH_CASE_INSENSITIVE
static final int MATCH_MULTILINE
static final int MATCH_SINGLELINE
void setPattern(java.lang.String pattern) throws BuildException
pattern
- the pattern to matchBuildException
- on errorjava.lang.String getPattern() throws BuildException
BuildException
- on errorboolean matches(java.lang.String argument) throws BuildException
argument
- the string to match againstBuildException
- on errorjava.util.Vector getGroups(java.lang.String argument) throws BuildException
Group 0 will be the full match, the rest are the parenthesized subexpressions
.argument
- the string to match againstBuildException
- on errorboolean matches(java.lang.String input, int options) throws BuildException
input
- The string to check for a matchoptions
- The list of options for the match. See the
MATCH_ constants above.BuildException
- on errorjava.util.Vector getGroups(java.lang.String input, int options) throws BuildException
input
- The string to check for a matchoptions
- The list of options for the match. See the
MATCH_ constants above.BuildException
- on error