Reply to Re: RegExp : using end-of-line in a pattern

Your name:

Reply:


Posted by Zilla on 09/21/05 19:55

Damien wrote:
....
> Thanks for this. I have several values to look for, and I don't know in
> what lines they are (imagine a form lost in the middle of a text). This
> is why I did not break up the text in lines. I'd rather not look for
> evey value in every line...

I think I found out whats wrong. I think I have read some place that the
function looks for the largest possible pattern. So if you are looking
for some a letter followed by a : in the following:

"x:y:z"

it will return "x:y:" and not "x:" as you were looking for.

So in your example there must be a newline after "Adress: Paris" so it
takes this line too.

When that is said, i can't figure out just now, how to prevent it from
doing that. But I'll think about it and get back later if i figure it out.

Zilla

[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

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