FileDocCategorySizeDatePackage
RegexpMatcher.javaAPI DocApache Ant 1.703458Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.util.regexp

RegexpMatcher

public interface RegexpMatcher
Interface describing a regular expression matcher.

Fields Summary
int
MATCH_DEFAULT
Default Mask (case insensitive, neither multiline nor singleline specified).
int
MATCH_CASE_INSENSITIVE
Perform a case insenstive match
int
MATCH_MULTILINE
Treat the input as a multiline input
int
MATCH_SINGLELINE
Treat the input as singleline input ('.' matches newline)
Constructors Summary
Methods Summary
public java.util.VectorgetGroups(java.lang.String argument)
Returns a Vector of matched groups found in the argument using default options.

Group 0 will be the full match, the rest are the parenthesized subexpressions

.

param
argument the string to match against
return
the vector of groups
throws
BuildException on error

public java.util.VectorgetGroups(java.lang.String input, int options)
Get the match groups from this regular expression. The return type of the elements is always String.

param
input The string to check for a match
param
options The list of options for the match. See the MATCH_ constants above.
return
the vector of groups
throws
BuildException on error

public java.lang.StringgetPattern()
Get a String representation of the regexp pattern

return
the pattern
throws
BuildException on error

public booleanmatches(java.lang.String argument)
Does the given argument match the pattern?

param
argument the string to match against
return
true if the pattern matches
throws
BuildException on error

public booleanmatches(java.lang.String input, int options)
Does this regular expression match the input, given certain options

param
input The string to check for a match
param
options The list of options for the match. See the MATCH_ constants above.
return
true if the pattern matches
throws
BuildException on error

public voidsetPattern(java.lang.String pattern)
Set the regexp pattern from the String description.

param
pattern the pattern to match
throws
BuildException on error