RegEx for PostMaster filter

Moderator: crythias

Locked
PiotrIr
Znuny newbie
Posts: 25
Joined: 02 Sep 2015, 17:37
Znuny Version: 4 Patch Level 11

RegEx for PostMaster filter

Post by PiotrIr »

I’m trying to match body of e-mail with following pattern

condition

Body @micr

e-mail headers
X-OTRS-CustomerNo Microsoft

The trick is I would like to set this as case insensitive so could use @Micr, @miCr or whatever. Unfortunately can’t find RegEx which would actually work. From tester looks it should be:

/\@\bmicr\/i

But this doesn’t work. Could you advise please?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: RegEx for PostMaster filter

Post by reneeb »

Try

Code: Select all

\@(?i:micr)
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
PiotrIr
Znuny newbie
Posts: 25
Joined: 02 Sep 2015, 17:37
Znuny Version: 4 Patch Level 11

Re: RegEx for PostMaster filter

Post by PiotrIr »

Thank you reneeb!
Locked