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
Modifier and Type | Field and Description |
---|---|
private static Log |
baseLog
Default log (class wide)
|
private Log |
log
Custom log (can be set per object)
|
Constructor and Description |
---|
SimpleRegexMatcher() |
Modifier and Type | Method and Description |
---|---|
Log |
getLog()
Gets the
Log implementation. |
boolean |
match(java.lang.String basePattern,
java.lang.String regexPattern)
Matches using simple regex algorithm.
|
private boolean |
match(java.lang.String basePattern,
java.lang.String regexPattern,
int baseAt,
int regexAt)
Implementation of regex matching algorithm.
|
void |
setLog(Log log)
Sets the current
Log implementation used by this class. |
private static final Log baseLog
private Log log
public Log getLog()
Log
implementation.public void setLog(Log log)
Log
implementation used by this class.public boolean match(java.lang.String basePattern, java.lang.String regexPattern)
match
in class RegexMatcher
basePattern
- the standard digester path representing the elementregexPattern
- the regex pattern the path will be tested againstprivate boolean match(java.lang.String basePattern, java.lang.String regexPattern, int baseAt, int regexAt)
Copyright 2001-2005 The Apache Software Foundation.