regexp matching question

William Park opengeometry-FFYn/CNdgSA at public.gmane.org
Wed Oct 5 21:12:42 UTC 2005


On Wed, Oct 05, 2005 at 12:33:15PM +0300, Peter wrote:
> 
> Hi all
> 
> I need to match email messages using regexec(3). I would like to match 
> as much as possible in a piece, i.e. the interesting headers and the 
> body (which could be large). Can this be done and is it economical 
> (speedwise) to use a single hairy regexp to match the whole message or 
> is it better to match the message and then parse it ? formail already 
> does this somehow (I have not looked yet).

Such question is asked by newbie.  But, since you're asking this, there
must be something else to it.  Can you give an example?

Header and body are separate section of email message, so they should be
searched separately.  There is no reason why an email message shouldn't
be in memory (ie. procmail does it), so without more detail, it's
difficult to answer.

-- 
William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
	   http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
	  http://freshmeat.net/projects/bashdiff/
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list