"Invalid Regular Expression field" for event rule

SusanWinKY
Kilo Sage

In an Event Rule I'm looking to parse the node to get only the string after the first space.

 

Example:

node = westeurope dev2-westeu-cloud-k8s

desired result = dev2-westeu-cloud-k8s

 

I am trying this regex:  (?<= ).*

But getting an "Invalid Regular Expression field" error when I save the Event Rule.

 

This, of course, works at https://regex101.com/.

 

Is there a way to do this with the regex editor for an Event Rule?


Susan Williams, Lexmark
1 ACCEPTED SOLUTION

Tony, thanks for your reply.  Turns out the regex functionality in Event Rules does not support positive lookbehind. I was able to figure out a different solution using this regex:  .*\s(.*)


Susan Williams, Lexmark

View solution in original post

2 REPLIES 2

Tony Chatfield1
Kilo Patron

Hi, perhaps the 'space' is causing issues, what about (?<=\s).*

Tony, thanks for your reply.  Turns out the regex functionality in Event Rules does not support positive lookbehind. I was able to figure out a different solution using this regex:  .*\s(.*)


Susan Williams, Lexmark