2. Enterprise Integration Patterns

regExReplacer

Version

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

Syntax

regExReplacer:
regex: <string> # required
replace: <string> # required
target: body
regExReplacer:
  regex: <string> # required
  replace: <string> # required
  target: 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

Can be used in