Help on Event Rule Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 02:11 PM
Hello,
Can you guys help me translate this nodeName to a regex? I need the 'blankServer' parsed out at the end of the expression for my event rule.
/subscriptions/5611823-cf50-414d-9ace-2154113144/resourcegroups/5554-dahhda-dajjd-51554/providers/microsoft.compute/virtualmachines/blankServer
- Labels:
-
Event Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 04:48 PM
Hello - you should be able to do something like the following
(.*)virtualmachines\/(.*)
Event rule regex wants the entire string to be captured so even if you won't use the first group, it wants to capture it in a generic way and then the group after "virtualmachines/" will be the value you want to use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2024 01:15 PM
Hi VNick, did something change from Vancouver to Washington, because when we upgraded my Regex code stop working because in Event Management transform and Compose Alert Output, stop recognizing double quote as ", and start translating/displaying it to putting in the encoding code of ". Can you please tell me how to get around this. I needed the ASAP! Please see attached images. This happen recently when we update to Washington, prior to this update things were work excellent. help!.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2022 11:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 06:37 AM
The regex for event rules is a bit more sensitive than that and the entire string has to be captured or it would only parse correctly if the entire beginning of the string was exactly the same each time. The Xplore regex tester unfortunately does not use the same backend regex as event management rules (nor does regex101 or most other popular testers)