Re: Help with Php and Regex
- From: Mattia Gentilini <Mattia.Gentilini_REMOVE_@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 31 May 2007 17:05:11 +0200
The.Relinator@xxxxxxxxx ha scritto:
I'm just wondering what the best way is to extract and display aereg() is a test function, it checks if a regexp matches a given string and returns a boolean.
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];
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) *
.
- References:
- Help with Php and Regex
- From: The . Relinator
- Help with Php and Regex
- Prev by Date: Debugging PHP in OS X
- Next by Date: Preserving Chinese Characters when reading and writing text
- Previous by thread: Help with Php and Regex
- Next by thread: Re: Help with Php and Regex
- Index(es):
Relevant Pages
|