Event Rule - Regular Expression to remove a certain part of the String
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2020 12:08 PM
Hi There,
I am trying to write a regular expression in the event rule Transform section. I am getting extra characters in FQDN and i am trying to remove them.
The example strings are :
abcd-asm.vdcunix.local
abcdasm.vdcunix.local
i am trying to remove asm and -asm from the string. I used (\|*-asm|asm\|*) but it is returning as Unknown .
Expected outputs is: abcd.vdcunix.local
Kindly help me with expression here.
- Labels:
-
Event Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2020 04:30 AM
I don't think that this is achievable with just one reg expression, the only approach is what Patrick has suggested.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2020 11:53 AM
Thank you so much for the reply.
In another scenario of mine i want to get first two words of a parameter.For example if the field value is "Application1 Prod have issues", i want to extract only Application1 Prod.
I tried with ([^\s]+\s+[^\s]+) this is not working.
Can you please help me here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2020 11:53 AM
Thank you so much for the reply.
In another scenario of mine i want to get first two words of a parameter.For example if the field value is "Application1 Prod have issues", i want to extract only Application1 Prod.
I tried with ([^\s]+\s+[^\s]+) this is not working.
Can you please help me here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2020 12:18 PM
I would go with After Business Rule on record Update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2020 05:16 AM
Try (^\S*\s\S*)