Process steps for StringReplacer

StringReplacer supports these process steps that you can combine and are applied in this order:
  1. **UpperCase**
  2. **LowerCase**
  3. **Replace**
  4. **Pattern**

Use IgnoreCase="1" attribute for case-insensitive matching.

Unicode escapes \u0000 to \uffff are supported.

**UpperCase**

This process step converts all characters in the string to uppercase.

XML configuration:
<Step>
	 <Name>UpperCase</Name> 
</Step>
Optional parameter: Language code (ISO-639)
<Step>
	 <Name>UpperCase</Name>
	 <Parameter>de</Parameter> 
</Step>

Example:

Input: "Hello World"

Output: "HELLO WORLD"

**LowerCase**

This process step converts all characters in the string to lowercase.

XML configuration:
<Step>
	 <Name>LowerCase</Name> 
</Step>
Optional parameter: Language code (ISO-639)
<Step>
	 <Name>LowerCase</Name>
	 <Parameter>en</Parameter> 
</Step>

Example:

Input: "Hello World"

Output: "hello world"

**Replace**

This process step performs character or string replacements defined in the Replacements section. All replacements in this process step happen simultaneously.

XML configuration:
<Step>
	 <Name>Replace</Name> 
</Step>
Replacements section:
<Replacements>
	 <ReplaceAll>
	 <From>Ä</From>
	 <To>AE</To>
	 </ReplaceAll>
	 <ReplaceAll>
	 <From IgnoreCase="1">ß</From>
	 <To>ss</To>
	 </ReplaceAll>
	 <ReplaceAll>
	 <From>©</From>
	 <To> COPYRIGHT</To>
	 </ReplaceAll> 
</Replacements>

Attributes:

IgnoreCase="1": Case-insensitive matching, optional

Example:

Input: "Größe Äpfel"

Output: "Groesse AEpfel", with appropriate replacements

**Pattern**

This process step applies regular expression pattern matching and replacement.

Java regex is used as the pattern syntax for this process step.

XML configuration:
<Step>
	 <Name>Pattern</Name>
	 <Parameter>[^\w- ]</Parameter>
	 <Parameter>?</Parameter> 
</Step>
Parameters:
  • First parameter, required: Regular expression pattern
  • Second parameter, optional: Replacement string, empty string if omitted

Example:

<Step>
	 <Name>Pattern</Name>
	 <Parameter>[^a-zA-Z0-9 ]</Parameter>
	 <Parameter></Parameter> 
</Step>

Input: "Hello@World!"

Output: "HelloWorld", removes special characters