Re: [Exim] Regex Help

Top Page
Delete this message
Reply to this message
Author: Jeff McAdams
Date:  
To: Marc Perkel
CC: exim-users
Subject: Re: [Exim] Regex Help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--
Marc Perkel wrote:
> Thanks for the try - but I was looking for the opposite logic.


Oh, blah...that's what I get for not going back and re-reading to make
sure I understood what you were looking for.

I started with a look-ahead, then forgot the "not" part, and then
thought, "Why am I using a lookahead?" Gah.

Anyway...glad you figured out what you needed.

> I figured it out:


> \*https?\:\/\/(?!.{0,20}yahoo)


You realize, of course, that this doesn't actually match the rest of the
regular expression...just the *https:// part. I don't know if that's
significant to you or not.

> Jeff McAdams wrote:
>
>> Marc Perkel wrote:
>>
>>> I need some help writing a regex to find this condition:
>>
>>
>>
>>> looking for the string "*http://" <---- yes the "*" is part of the
>>> string
>>
>>
>>
>>> that is not followed by "yahoo" within 10 characters.
>>
>>
>>
>>> So - *http://www.porn.com --- matches
>>
>>
>>
>>> but *http://news.yahoo.com --- fails
>>
>>
>>
>> /\*http:\/\/.{0,10}yahoo/
>>
>> Should be close, I think. Untested, so try it out and see if that works.
>
>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
> details at http://www.exim.org/ ##
>



--
Jeff McAdams
"He who laughs last, thinks slowest." -- anonymous
--
[ Content of type application/pgp-signature deleted ]
--