Skip to content

bmel:contains

Category: String · Returns: bmel:boolean

Signature
bmel:contains(expr: bmel:string, str: bmel:string)

Description

Returns true if the expression contains the specified substring.

Arguments

Parameter Type Required Description
expr bmel:string The string to search within.
str bmel:string The substring to search for.

Examples

The agent's answer mentions a refund
bmel:contains(bmel:lower({invokeAgent:Response Payload}.$.output_text), 'refund')
The user agent is a bot
bmel:contains({invokeAgent:HTTP Headers}.$.User-Agent, 'bot')

← Back to BMEL Reference