regexp matching question

Peter plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Wed Oct 5 21:27:16 UTC 2005


On Wed, 5 Oct 2005, Stewart C. Russell wrote:

> The O'Reilly regex book -- at least the first edition I have -- spent a whole 
> chapter on explaining an enormous catch-all expression for mail messages. I 
> actually remember understanding it, until I ran out of stack space a few 
> minutes later.
>
> I suspect there's a Perl library that'll do this for you, probably in Mail::*

Wee, I have that book. Why did I not look on the shelf ?

I was trying to make sense of it using Perl and I discovered that perl 
-wlpe 's/../../m;' does not work as I thought it would. The loop implied 
by -lp seems to sabotage the potential of the /m flag.

Another thing to try is tcl. tcl's regexp(n) gives full access to regexp 
(including subexpression matches etc). I have used it a lot this year. 
However tcl has really strange quoting rules under certain 
circumstances imho.

Please keep the ideas coming, I can already see some progress.

thanks,

Peter
--
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