-
1. Regular expressions in Email Monitor Policy
Cris CoffeyApr 30, 2012 8:04 AM (in response to Damon Maranya)
1 of 1 people found this helpfulI copied a doc over from our old site that might help you. It shows examples of simple regular expressions for the monitor policies and is located here. There are also quite a few resources available online and the help for monitor policies has some examples as well.
-
2. Regular expressions in Email Monitor Policy
Damon Maranya Apr 30, 2012 8:57 AM (in response to Cris Coffey)Thanks Chris, but the document that you linked to I am already familiar with. It covers matching based on a single string value, and matching based on one or more string values from a list. But it doesn't cover matching on all stings values (i.e. string1 and string2 and string3 to trigger the email monitor policy).
I have looked around on the interwebs but the things I have found have either not been applicable or have been written for someone with greater experience with regular expressions that I have. Could you point me to any good online resources that you have found for regular expression matching in Numara?
Thanks,
Damon M.
IT Support
RES - Americas
-
3. Regular expressions in Email Monitor Policy
Cris CoffeyApr 30, 2012 9:01 AM (in response to Damon Maranya)
What exactly are you trying to match? Give me an example of what you are trying to do and I can try to show you how to format it.
-
4. Regular expressions in Email Monitor Policy
Damon Maranya Apr 30, 2012 9:12 AM (in response to Cris Coffey)I am trying to get an emaiil monitor policy rule to match when it sees an email subject line containing say, RES, New and Hire anywehere in the subject line. Mind you these are full strings so I don't want it matching unless these are individual words. So I would not want it to match on "resurecting news in the shire" but I would want it to match "RES - patric smith - new accounting hire".
Is this something that can be done or will I need to become fluent in regular expressions to get this to work?
-
5. Regular expressions in Email Monitor Policy
Cris CoffeyApr 30, 2012 12:33 PM (in response to Damon Maranya)
As wacky as this looks, this is what you need to put in there to find what you describe above.
^(?=.*?\bres\b)(?=.*?\bnew\b)(?=.*?\bhire\b).*$
I just tested it in my demo version of Track-It! and it worked perfectly. Even using your Shire example. Lord of the Rings fan? :-)
-
6. Regular expressions in Email Monitor Policy
Damon Maranya May 1, 2012 5:18 PM (in response to Cris Coffey)That did it. Thanks a ton Chris.
-
7. Regular expressions in Email Monitor Policy
Cris CoffeyMay 2, 2012 8:39 AM (in response to Damon Maranya)
No problem. Glad to help.
-
8. Re: Regular expressions in Email Monitor Policy
Christian Beaumont Apr 3, 2014 7:05 AM (in response to Damon Maranya)Hi, I'm looking for the opposite of what Damon has mentioned.
Damon Maranya wrote:
So I would not want it to match on "resurecting news in the shire" but I would want it to match "RES - patric smith - new accounting hire".
In my case I would like it to read part of a string for a single word, using his example it would not detect "res" in resurrecting or "hire" in shire but it would detect "ews" in news.
Can you please advise ?
-
9. Re: Regular expressions in Email Monitor Policy
Cris CoffeyApr 3, 2014 7:39 AM (in response to Christian Beaumont)
Ok, so you are looking for it to read part of a word? That should be as simple as just typing ews into the box.
You can use this regex syntax checker to validate anything you are trying to do.
-
10. Re: Regular expressions in Email Monitor Policy
Christian Beaumont Apr 3, 2014 8:41 AM (in response to Cris Coffey)Cris Coffey wrote:
Ok, so you are looking for it to read part of a word? That should be as simple as just typing ews into the box.
You can use this regex syntax checker to validate anything you are trying to do.
I want it to read part of a word and two full words.
Heres an example:
Email Subject type 1: Location001MasterPC is DOWN
I want it to detect "MasterPC is DOWN" and assign the appropriate template and technician, but these words may not always be in sequence.
Putting MasterPC is DOWN into the box does not seem to be working, I removed Master is and just used DOWN and they flood through.
-
11. Re: Regular expressions in Email Monitor Policy
Cris CoffeyApr 3, 2014 8:49 AM (in response to Christian Beaumont)
Probably due to spaces in the words. Try putting quotes around “MasterPC is DOWN”.
--Cris
-
12. Re: Regular expressions in Email Monitor Policy
Christian Beaumont Apr 3, 2014 9:00 AM (in response to Cris Coffey)Cris Coffey wrote:
Probably due to spaces in the words. Try putting quotes around “MasterPC is DOWN”.
--Cris
The 1st word wont always be infront of is DOWN.
Im going to try MasterPC[\w\s\d]+is Down