org.apache.tools.ant.filters
Class TokenFilter.ContainsRegex
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.filters.TokenFilter.ChainableReaderFilter
|
+--org.apache.tools.ant.filters.TokenFilter.ContainsRegex
- All Implemented Interfaces:
- ChainableReader, TokenFilter.Filter
- Enclosing class:
- TokenFilter
- public static class TokenFilter.ContainsRegex
- extends TokenFilter.ChainableReaderFilter
filter to filter tokens matching regular expressions.
Method Summary |
java.lang.String |
filter(java.lang.String string)
apply regex and substitution on a string |
void |
setFlags(java.lang.String flags)
|
void |
setPattern(java.lang.String from)
|
void |
setReplace(java.lang.String to)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenFilter.ContainsRegex
public TokenFilter.ContainsRegex()
setPattern
public void setPattern(java.lang.String from)
- Parameters:
from
- the regex pattern
setReplace
public void setReplace(java.lang.String to)
- Parameters:
to
- the replacement string
setFlags
public void setFlags(java.lang.String flags)
- Parameters:
flags
- the regex flags
filter
public java.lang.String filter(java.lang.String string)
- apply regex and substitution on a string
- Parameters:
string
- the string to apply filter on
- Returns:
- the filtered string
Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.