user6852450
user6852450

Reputation:

Mulesoft --- the occurrence of a in payload using dataweave mule

the occurrence of a in payload using dataweave mule

Upvotes: 0

Views: 1146

Answers (2)

user3366906
user3366906

Reputation: 149

Expression component can be used to find if particular character exists in a string. Below result is stored in a flow variable which can be accessed later in the flow.

 <expression-component doc:name="Expression"><![CDATA[flowVars.index="test example test".indexOf("a");]]></expression-component>

Upvotes: 0

Jesse0451
Jesse0451

Reputation: 81

scan returns an array of substrings that match a regular expression.

So something like sizeOf ("test string test" scan "test") will return the number of occurances of "test" from the string "test string test"

Upvotes: 1

Related Questions