- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2022 02:03 PM
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
Solved! Go to Solution.
- Labels:
-
Event Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 03:05 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2022 03:38 PM
Hi, perhaps the 'space' is causing issues, what about (?<=\s).*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2022 03:05 PM
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