Jdk14RegexpRegexp (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.util.regexp, class: Jdk14RegexpRegexp

# Class Jdk14RegexpRegexp

java.lang.Object
org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher
org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp

All Implemented Interfaces:
  `Regexp, RegexpMatcher`

public class Jdk14RegexpRegexp extends Jdk14RegexpMatcher implements Regexp
Regular expression implementation using the JDK 1.4 regular expression package

- ## Field Summary

  ### Fields inherited from interface Regexp

  `REPLACE_ALL, REPLACE_FIRST`
  Modifier and Type
  Field
  Description
  `static final int`
  `REPLACE_ALL`
  Replace all occurrences of the regular expression
  `static final int`
  `REPLACE_FIRST`
  Replace only the first occurrence of the regular expression

  ### Fields inherited from interface RegexpMatcher

  `MATCH_CASE_INSENSITIVE, MATCH_DEFAULT, MATCH_MULTILINE, MATCH_SINGLELINE`
  Modifier and Type
  Field
  Description
  `static final int`
  `MATCH_CASE_INSENSITIVE`
  Perform a case insensitive match
  `static final int`
  `MATCH_DEFAULT`
  Default Mask (case insensitive, neither multiline nor singleline specified).
  `static final int`
  `MATCH_MULTILINE`
  Treat the input as a multiline input
  `static final int`
  `MATCH_SINGLELINE`
  Treat the input as singleline input ('.' matches newline)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Jdk14RegexpRegexp()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected int`
  `getSubsOptions(int options)`
  Convert ant regexp substitution option to jdk1.4 options.
  `String`
  `substitute(String input, String argument, int options)`
  Perform a substitution on the regular expression.

  ### Methods inherited from class Jdk14RegexpMatcher

  `getCompiledPattern, getCompilerOptions, getGroups, getGroups, getPattern, matches, matches, setPattern`
  Modifier and Type
  Method
  Description
  `protected Pattern`
  `getCompiledPattern(int options)`
  Get a compiled representation of the regexp pattern
  `protected int`
  `getCompilerOptions(int options)`
  Convert the generic options to the regex compiler specific options.
  `Vector<String>`
  `getGroups(String argument)`
  Returns a Vector of matched groups found in the argument using default options.
  `Vector<String>`
  `getGroups(String input, int options)`
  Returns a Vector of matched groups found in the argument.
  `String`
  `getPattern()`
  Get a String representation of the regexp pattern
  `boolean`
  `matches(String argument)`
  Does the given argument match the pattern using default options?
  `boolean`
  `matches(String input, int options)`
  Does the given argument match the pattern?
  `void`
  `setPattern(String pattern)`
  Set the regexp pattern from the String description.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Jdk14RegexpRegexp

    public Jdk14RegexpRegexp()

- ## Method Details

  - ### getSubsOptions

    protected int getSubsOptions(int options)
    Convert ant regexp substitution option to jdk1.4 options.
    Parameters:
      `options` - the ant regexp options
    Returns:
      the jdk14 substitution options

  - ### substitute

    public String substitute(String input, String argument, int options) throws BuildException
    Perform a substitution on the regular expression.
    Specified by:
      `substitute` in interface `Regexp`
    Parameters:
      `input` - The string to substitute on
      `argument` - The string which defines the substitution
      `options` - The list of options for the match and replace.
    Returns:
      the result of the operation
    Throws:
      `BuildException` - on error