org.apache.tools.ant.util.regexp

Interface Regexp

public interface Regexp extends RegexpMatcher

Interface which represents a regular expression, and the operations that can be performed on it.
Field Summary
intREPLACE_ALL
Replace all occurrences of the regular expression
intREPLACE_FIRST
Replace only the first occurrence of the regular expression
Method Summary
Stringsubstitute(String input, String argument, int options)
Perform a substitution on the regular expression.

Field Detail

REPLACE_ALL

public int REPLACE_ALL
Replace all occurrences of the regular expression

REPLACE_FIRST

public int REPLACE_FIRST
Replace only the first occurrence of the regular expression

Method Detail

substitute

public String substitute(String input, String argument, int options)
Perform a substitution on the regular expression.

Parameters: input The string to substitute on argument The string which defines the substitution options The list of options for the match and replace. See the MATCH_ and REPLACE_ constants above.

Returns: the result of the operation

Throws: BuildException on error