You are here: Re: Help with Php and Regex « PHP Programming Language « IT news, forums, messages
Re: Help with Php and Regex

Posted by Mattia Gentilini on 05/31/07 15:05

The.Relinator@gmail.com ha scritto:
> I'm just wondering what the best way is to extract and display a
> number from a html file.
>
> I tried the following piece of code, however it does not work.
>
> ereg('\d\.\d', $content, $reg);
> echo $reg[0];
ereg() is a test function, it checks if a regexp matches a given string
and returns a boolean.
You probably need ereg_replace($regexp, $substitute, $input); see the
doc for details.

--
|\/|55: Mattia Gentilini e 55 cappuccini per svegliarsi (by Sigfrido)
|/_| ETICS project at CNAF, INFN, Bologna, Italy
|\/| www.getfirefox.com www.getthunderbird.com
* Using Mac OS X 10.4.9 powered by Cerebros (Core 2 Duo) *

 

Navigation:

[Reply to this 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

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