%dw 2.0
import * from dw::util::Coercions
output application/dw
---
{
toRegexEx1: toRegex("a-Z"),
toRegexEx2: toRegex("0-9+")
}
toRegex
toRegex(str: String): Regex
Transforms a String
value into a Regex
value.
Introduced in DataWeave version 2.4.0.