I need some help with REGEX transformation in rules:
I execute in a bash script with the executecommandline command, receive either a negative integer (e.g. „-14“) or some text und a negative integer (e.g. „some text -14) and put in a string var.
Now I want to extract only the integer value (negativ or positiv doesn’t matter). I thought the easiest way to do that would be a REGEX transformation, but unfortunately I can’t get it work or rather I don’t know exactly which syntax is the right one.
I tried
var Number shortened = transform("REGEX", longString, ".*[0-9]")
and some variation of that.
Could someone give me a hint, to do it the right way?
Thanks!