Reputation:
the occurrence of a in payload using dataweave mule
Upvotes: 0
Views: 1146
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
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