org.apache.tools.ant.util.regexp
Interface RegexpMatcher


public interface RegexpMatcher

Interface describing a regular expression matcher.


Method Summary
 java.util.Vector getGroups(java.lang.String argument)
          Returns a Vector of matched groups found in the argument.
 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?
 void setPattern(java.lang.String pattern)
          Set the regexp pattern from the String description.
 

Method Detail

setPattern

public void setPattern(java.lang.String pattern)
                throws BuildException
Set the regexp pattern from the String description.

getPattern

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

matches

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

getGroups

public java.util.Vector getGroups(java.lang.String argument)
Returns a Vector of matched groups found in the argument.

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

.


Includes only those classes commonly used by task writers. The Ant 1.4.1 distribution includes complete Javadoc for all classes included in Ant, though in most cases these are not intended as APIs.