|
Posted by Rik Wasmus on 10/29/07 22:39
On Mon, 29 Oct 2007 23:14:52 +0100, Jim <jimyt@yahoo.com> wrote:
>
>> Well, taking a guess here, but 'http://' is not preceded by 'http', so
>> it
>> will match in $2. Lookaheads/behinds without a literal match is often
>> not
>> a very nice way to go.
>
> Now I'm really confused, I thought that was the idea of the lookbehind
> assertion, oh well.
Think of it like this:
'foofoo' is foo before foo.
'foobar' is foo without foo in front of it.
With a literal match, I mean the following: if you know the text you are
looking for ('foo'), you can specify that it should or should not be
preceded by something ('bar') in order to match. However, if you don't
know the text you're looking for ((.*?)), you can specify all you want it
shouldn't be preceded by something, but text isn't preceded by itself.
--
Rik Wasmus
[Back to original message]
|