Skip to content

bmel:replace

Category: String · Returns: bmel:string

Signature
bmel:replace(expr: bmel:string, from: bmel:string, to: bmel:string)

Description

Replaces all occurrences of a substring within the expression with a new value.

Arguments

Parameter Type Required Description
expr bmel:string The source string.
from bmel:string The substring to search for and replace.
to bmel:string The replacement string.

Examples

Remove the dashes of a phone number
bmel:replace({createOrder:Request Payload}.$.customer.phone, '-', '')
Rename a legacy status value
bmel:replace({getOrder:Response Payload}.$.status, 'CANCELLED', 'CANCELED')

← Back to BMEL Reference