edu.tum.cs.commons.string
Class RegexReplacementProcessor
java.lang.Object
edu.tum.cs.commons.string.RegexReplacementProcessor
public class RegexReplacementProcessor
- extends Object
This class allows the application of multiplex IRegexReplacements to
a string.
- Version:
- $Rev: 26283 $
- Author:
- Florian Deissenboeck, $Author: juergens $
- Rating:
- GREEN Hash: 34CDDB3007890E0011169AE24AE44CA9
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexReplacementProcessor
public RegexReplacementProcessor(List<IRegexReplacement> expressions)
- Create a new replacement processor.
process
public String process(String text)
throws PatternSyntaxException
- Apply replacements to a string.
- Returns:
- the input string after the application of all replacements or the
a copy of the input string if the list of replacements is empty.
- Throws:
PatternSyntaxException - unfortunately method
Matcher.replaceAll(java.lang.String) throws an
IndexOutOfBoundsException if a non-existent capturing
group is referenced. This method converts this exception to a
PatternSyntaxException.
TUM CCSM Commons - 2.7