Paul J Stevens <[EMAIL PROTECTED]> said:

> Aaron Stone wrote:
[snip]
>> It works well, but I wonder if it wouldn't be easier to just do this:
>> 
>> SELECT * FROM messageblks WHERE messageblk LIKE
>> '%From:[EMAIL PROTECTED]';
>> 
>> Since LIKE works everywhere, and doesn't fire up a regex engine... well,
>> benchmarking is in order, I think ;-)
> 
> Won't work. LIKE is like a multiline regexp. So you might do:
> 
> '%From: [EMAIL PROTECTED]' but
> '%From:[EMAIL PROTECTED]' would match any messages that contain
> [EMAIL PROTECTED] in any header including and after the From: header.

We'd have to write a regex that's basically a mini header parser if we
wanted 100% accurate results. I'm thinking that we'd use a LIKE to get
about 150% results, and then parse the headers of those messages to see
what matches.

I think it's worth benchmarking both approaches, if we can write an
accurate regex in the first place.

Aaron

--

Reply via email to