Reply to Re: PCRE - Negative Lookbehind Assertion problem

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация