Class SimpleRegexMatcher

java.lang.Object
org.apache.commons.digester3.RegexMatcher
org.apache.commons.digester3.SimpleRegexMatcher

public class SimpleRegexMatcher extends RegexMatcher

Simple regex pattern matching algorithm.

This uses just two wildcards:

  • * matches any sequence of none, one or more characters
  • ? matches any one character
Escaping these wildcards is not supported .

Since:
1.5
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.commons.logging.Log
    Gets the Log implementation.
    boolean
    match(String basePattern, String regexPattern)
    Returns true if the given pattern matches the given path according to the regex algorithm that this strategy applies.
    void
    setLog(org.apache.commons.logging.Log log)
    Sets the current Log implementation used by this class.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getLog

      public org.apache.commons.logging.Log getLog()
      Gets the Log implementation.
      Returns:
      the Log implementation.
    • setLog

      public void setLog(org.apache.commons.logging.Log log)
      Sets the current Log implementation used by this class.
      Parameters:
      log - the current Log implementation used by this class.
    • match

      public boolean match(String basePattern, String regexPattern)
      Returns true if the given pattern matches the given path according to the regex algorithm that this strategy applies.
      Specified by:
      match in class RegexMatcher
      Parameters:
      basePattern - the standard digester path representing the element
      regexPattern - the regex pattern the path will be tested against
      Returns:
      true if the given pattern matches the given path