Re: Getting xfilter AND delivery to working

[email protected] Thu, 4 Feb 2016 20:41:22 +0000
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
On Thu, Feb 04, 2016 at 02:28:56PM -0500, Bob Bernstein wrote:
> On Thu, 4 Feb 2016, Philip Rhoades wrote:
> 
> > if( /^[TC][[co]:.*tst/ )
 
> Could someone explain the syntax of the very first line above, 
> to wit:
> 
> if( /^[TC][[co]:.*tst/ )
> 
> At first glance I thought I was looking at unbalanced brackets:

> What is the purpose of this expression? I'm thinking it is looking to 
> match some combination, with varying cases, of To and Cc.

The brackets had me too. They screamed unclosed to me. However, now 
you've asked I ran it through perl:

  for i in To Cc T[o C[c ; do echo -e "$i:tst" ; done  | perl -ne 'BEGIN 
  { use strict; use warnings; } chomp; if( $_ =~ /^[TC][[co]:.*tst/ ) { 
  print $_, "\n"; }'
  To:tst
  Cc:tst

Seems legit. Doesn't matter how many [ you place before 'co', same 
result every time. Guess perl is just being generous.

-- 
Best regards,
Ed http://www.usenix.org.uk/


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140