public class RegexConversion extends Object implements Conversion<String,String>
revert(String) implements the same behavior of execute(String). Null inputs produce null outputs.| Constructor and Description |
|---|
RegexConversion(String replaceRegex,
String replacement)
Creates a conversion that matches contents identified by the given regular expression and replaces them by the given replacement String.
|
| Modifier and Type | Method and Description |
|---|---|
String |
execute(String input)
Executes the regular expression provided in the constructor of this class against the input and replaces any matched content with the replacement String.
|
String |
revert(String input)
Executes the regular expression provided in the constructor of this class against the input and replaces any matched content with the replacement String.
|
public RegexConversion(String replaceRegex, String replacement)
replaceRegex - the regular expression used to match contents of a given input Stringreplacement - the replacement content to replace any contents matched by the given regular expressionpublic String execute(String input)
revert(String)execute in interface Conversion<String,String>input - The input to have contents matched by the regular expression and replacedpublic String revert(String input)
execute(String)revert in interface Conversion<String,String>input - The input to have contents matched by the regular expression and replacedCopyright © 2019 Univocity Software Pty Ltd. All rights reserved.