Loading
Ongoing maintenance for Salesforce HelpRead More

How to define case insensitive regex in Mule Expression Language

Publish Date: Jun 20, 2025
Resolution

GOAL

 To define case insensitive matching in the regular expression used in Mule Expression Language

PROCEDURE

Mule Expression Language leverages java.util.regex capabilities for regex functionality,
To enable case insensitive matching prefix regular expression with (?i) syntax as in the below examples.

Example:

For payload having value "AaaBbbCcc" (Value within quotes) below are the scenarios and result

ScenarioRegexResult
Case Sensitive Expression1) #[payload.matches('aaabbbccc')]

2) #[regex('(aa)(.*)(cc)')]
1) FALSE

2) null
Case Insensitive Expression1) #[payload.matches('(?i)aaabbbccc')]

2) #[regex('(?i)(aaa)(.*)(ccc)')]
1) TRUE

2) Array having below values
AaaBbbCcc
Aaa
Bbb
Ccc


Reference links
Mule Docs
Java Docs  

Knowledge Article Number

001118505

 
Loading
Salesforce Help | Article