3 messages in net.sourceforge.lists.courier-maildrop[maildropl] Non greedy matches ?
FromSent OnAttachments
dushyAug 6, 2005 5:43 am 
Sam VarshavchikAug 6, 2005 7:17 am 
Paul L. AllenAug 9, 2005 12:15 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Non greedy matches ?Actions...
From:dushy (dush@gmail.com)
Date:Aug 6, 2005 5:43:03 am
List:net.sourceforge.lists.courier-maildrop

Hey,

Is there a way to do non greedy matches. The maildrop man page says that it tries to match as much as possible initialy.

=?iso-8859-1?B?Rnc6IKG5qqu7+aRXuqahQaZMqu2+96/Tp/erfr3opl71WKFBu/mu5qSj?= =?iso-8859-1?B?uqa7+SEgIEFubnkwOTEyMDYzMg==?=

For the above sample text in $SUBJECT (in single line), i want to match each pattern individually. But the below regex matches the entire line instead.

foreach ($SUBJECT) =~ /=\?.+\?.+\?.+\?=/ { if ( $MATCH =~ /([:space:])*=\?!.+!\?!.+!\?!.+!\?=([:space:])*/ ) { SCHARSET=$MATCH2 SENCODETYPE=$MATCH4 ESUBJECT=$MATCH6 } }

Is there any way to use non greedy quantifiers ? The below regex works well in regex coach and matches each pattern in the sample text individually but not in maildrop.

TIA Dushyanth