Loading

How to define case insensitive regex in Mule Expression Language

게시 일자: Jun 20, 2025
솔루션

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 기사 번호

001118505

 
로드 중
Salesforce Help | Article