public interface RegexpMatcher
| Modifier and Type | Field and Description |
|---|---|
static int |
MATCH_CASE_INSENSITIVE
Perform a case insenstive 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 |
|---|---|
Vector<String> |
getGroups(String argument)
Returns a Vector of matched groups found in the argument
using default options.
|
Vector<String> |
getGroups(String input,
int options)
Get the match groups from this regular expression.
|
String |
getPattern()
Get a String representation of the regexp pattern
|
boolean |
matches(String argument)
Does the given argument match the pattern?
|
boolean |
matches(String input,
int options)
Does this regular expression match the input, given
certain options
|
void |
setPattern(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(String pattern) throws RuntimeException
pattern - the pattern to matchorg.apache.tools.ant.BuildException - on errorRuntimeExceptionString getPattern() throws RuntimeException
org.apache.tools.ant.BuildException - on errorRuntimeExceptionboolean matches(String argument) throws RuntimeException
argument - the string to match againstorg.apache.tools.ant.BuildException - on errorRuntimeExceptionVector<String> getGroups(String argument) throws RuntimeException
Group 0 will be the full match, the rest are the parenthesized subexpressions
.argument - the string to match againstorg.apache.tools.ant.BuildException - on errorRuntimeExceptionboolean matches(String input, int options) throws RuntimeException
input - The string to check for a matchoptions - The list of options for the match. See the
MATCH_ constants above.org.apache.tools.ant.BuildException - on errorRuntimeExceptionVector<String> getGroups(String input, int options) throws RuntimeException
input - The string to check for a matchoptions - The list of options for the match. See the
MATCH_ constants above.org.apache.tools.ant.BuildException - on errorRuntimeExceptionCopyright © 2001–2025. All rights reserved.