org.apache.tools.ant.util.regexpInterface Regexp
- All Superinterfaces:
- RegexpMatcher
- All Known Implementing Classes:
- JakartaOroRegexp, JakartaRegexpRegexp, Jdk14RegexpRegexp
public interface Regexp extends RegexpMatcherInterface which represents a regular expression, and the operations that can be performed on it.
Field Summary
Fields Modifier and Type Field and Description static int
REPLACE_ALL
Replace all occurrences of the regular expressionstatic int
REPLACE_FIRST
Replace only the first occurrence of the regular expression
Fields inherited from interface org.apache.tools.ant.util.regexp.RegexpMatcher
MATCH_CASE_INSENSITIVE, MATCH_DEFAULT, MATCH_MULTILINE, MATCH_SINGLELINE
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.lang.String
substitute(java.lang.String input, java.lang.String argument, int options)
Perform a substitution on the regular expression.
Methods inherited from interface org.apache.tools.ant.util.regexp.RegexpMatcher
getGroups, getGroups, getPattern, matches, matches, setPattern
Field Detail
REPLACE_FIRST
static final int REPLACE_FIRSTReplace only the first occurrence of the regular expression
- See Also:
- Constant Field Values
REPLACE_ALL
static final int REPLACE_ALLReplace all occurrences of the regular expression
- See Also:
- Constant Field Values
Method Detail
substitute
java.lang.String substitute(java.lang.String input, java.lang.String argument, int options) throws BuildExceptionPerform a substitution on the regular expression.
- Parameters:
input
- The string to substitute onargument
- The string which defines the substitutionoptions
- 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