Reply to Re: year in a (****) format

Your name:

Reply:


Posted by Toby A Inkster on 03/28/07 10:23

iktorn wrote:

> <?php
> $text ="sajdkahs (2005) asgjgdjasdkh (20056) hdsgfjsgfsd
> ajgsda (1234 jksdhkjfhskjdh ) sgfdggsd (1256)";
> if(preg_match_all("/\([0-9]{4}\)/",$text,$matches)) {
> print_r($matches[0]);
> }
> ?>

Better:

<?php
$text ="sajdkahs (2005) asgjgdjasdkh (20056) hdsgfjsgfsd
ajgsda (1234 jksdhkjfhskjdh ) sgfdggsd (1256) 2345";
if(preg_match_all("/\(([0-9]{4})\)/",$text,$matches)) {
print_r($matches[1]);
}
?>

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

[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

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