Class JakartaOroRegexp
java.lang.Object
org.apache.tools.ant.util.regexp.JakartaOroMatcher
org.apache.tools.ant.util.regexp.JakartaOroRegexp
- All Implemented Interfaces:
Regexp, RegexpMatcher
Regular expression implementation using the Jakarta Oro package
-
Field Summary
Fields inherited from class JakartaOroMatcher
compiler, matcherFields inherited from interface Regexp
REPLACE_ALL, REPLACE_FIRSTModifier and TypeFieldDescriptionstatic final intReplace all occurrences of the regular expressionstatic final intReplace only the first occurrence of the regular expressionFields inherited from interface RegexpMatcher
MATCH_CASE_INSENSITIVE, MATCH_DEFAULT, MATCH_MULTILINE, MATCH_SINGLELINEModifier and TypeFieldDescriptionstatic final intPerform a case insensitive matchstatic final intDefault Mask (case insensitive, neither multiline nor singleline specified).static final intTreat the input as a multiline inputstatic final intTreat the input as singleline input ('.' matches newline) -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetSubsOptions(int options) Convert ant regexp substitution option to oro options.substitute(String input, String argument, int options) Perform a substitution on the regular expression.Methods inherited from class JakartaOroMatcher
getCompiledPattern, getCompilerOptions, getGroups, getGroups, getPattern, matches, matches, setPatternModifier and TypeMethodDescriptionprotected org.apache.oro.text.regex.PatterngetCompiledPattern(int options) Get a compiled representation of the regexp patternprotected intgetCompilerOptions(int options) Convert the generic options to the regex compiler specific options.Returns a Vector of matched groups found in the argument using default options.Returns a Vector of matched groups found in the argument.Get a String representation of the regexp patternbooleanDoes the given argument match the pattern using default options?booleanDoes the given argument match the pattern?voidsetPattern(String pattern) Set the regexp pattern from the String description.
-
Constructor Details
-
JakartaOroRegexp
public JakartaOroRegexp()
-
-
Method Details
-
substitute
Perform a substitution on the regular expression.- Specified by:
substitutein interfaceRegexp- Parameters:
input- The string to substitute onargument- The string which defines the substitutionoptions- The list of options for the match and replace.- Returns:
- the result of the operation
- Throws:
BuildException- on error
-
getSubsOptions
protected int getSubsOptions(int options) Convert ant regexp substitution option to oro options.- Parameters:
options- the ant regexp options- Returns:
- the oro substitution options
-