%dw 2.0
output application/json
---
[ ("admin123" matches /a.*\d+/), ("admin123" matches /^b.+/) ]
matches
matches(String, Regex): Boolean
Checks if an expression matches the entire input string.
For use cases where you need to output or conditionally process the matched value, see Pattern Matching in DataWeave.
Parameters
| Name | Description |
|---|---|
|
The input string. |
|
A Java regular expression for matching characters in the string. |



