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

Your name:

Reply:


Posted by Damien on 09/21/05 14:11

Hi to all,
I would like to get field values from a multi-line text.

For instance :
"
Name: Mr Smith
Address: Paris
"

I've tried to use (I'm a total regexp newbie, so I took it from the doc):
eregi("Name: (.*)\n",$VariableHoldingTheText,$parts);

Problem: $parts[1] starts at the right place, but does not stop at the
end of the line. I get :
"Mr Smith
Address: Paris
"

Where am I wrong ? I've tried to google around, but didn't find anything
that could help me...

Thanks in advance for your help/hints/links !

BR
--
Damien

[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

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