I have a data table with the following data,
regex_exp {REGEX} | app {STRING} |
---|---|
.*s3\.amazonaws\.com.* | Amazon |
.*storage\.live\.com.* | Microsoft |
Now, my requirement is that when ever the “regexexp” matches as mentioned, it should replace the variable($new_app) with the corresponding string in the “app” column.
I tried using the below expression, even though it’s not showing any error, but upon execution it’s failing (generic::unknown)
$new_app = array_distinct(re.replace(target.url, %Cloud_Services.regex_exp, %Cloud_Services.app))
Has anyone solved similar issue ? Is there any other way to solve the same ? Any leads on it will be really helpful.
Thank You.