I have a scrip to assign CustomFields based on a template and it often ends up collecting junk like HTML tags trailing after the data I want to match.


I think I have made my regex as specific as I can, but now I'm concerned that I went about this the wrong way.  I would love an opinion.


Emails that aren't human-generated typically have a block of data in them that includes data like:

Room:Y10A

Building:ddd

IP:172.16.2.2,fe80::250:43ff:fe00:ed31

MAC:DE:CA:FB:AD:11:97

Port:ddd-1@4/40

And sometimes they're handled by applications that generate them with HTML formatting, or are copy/pasted with HTML formatting, etc.


I have a CustomField called 'Building' and in my Template I have:

Building|Body|Building:*([^<]*+)\n||  


a) Is this ([^<]) necessary – or is there a way to merely ignore all HTML on incoming mail before it gets handed off to rt-mailtool that is preferred/better?

b) Is there something about my Template use that is obviously wrong?




     [✔]  Never use your HawkID's email address and password anywhere else! 
     Emory Lundberg, Security Friend, Information Security & Policy Office 
     University of Iowa, UCC, Campus Phone: 5-6174 

-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Reply via email to