Hi Team,
I am trying to use regex patterns in scripts. My problem is the regex patterns are dynamic which I'll be passing it via params for script.
In elasticsearch documentation, it is specified that only way to create pattern is using forward slashes
/[pattern]/
I need to use param value for regex matching.
Please let me know if there is any option to specify the param type as Pattern
or if there is any chance to convert a string variable to a Pattern obj in painless script.
Thanks,
David Barnabas Jacob