2. Enterprise Integration Patterns

regExReplacer

Version
Runs a regular-expression-replacement on either the message body (default) or all header values.

Can be used in

Syntax

<regExReplacer regex="string" replace="string" target="header|body" />
<regExReplacer regex="string" replace="string" target="header|body" />

Sample

<serviceProxy port="2000">
<regExReplacer regex="Hallo" replace="Hello" />
</serviceProxy>
<serviceProxy port="2000">
  <regExReplacer regex="Hallo" replace="Hello" />
</serviceProxy>

Attributes

NameRequiredDefaultDescriptionExamples
regextrue-Regex to match against the body.Hallo
replacetrue-String used to replace matched parts.Hello
targetfalsebodyWhether the replacement should affect the message body or the header values. Possible values are body and header.header