You are here: Re: regular expression help « PHP Programming Language « IT news, forums, messages
Re: regular expression help

Posted by Marcin Dobrucki on 09/15/05 12:45

phal wrote:
> ==========
> You can use this method
> =~/(\d{2}):(\d{2}):(\d{2})\.(\d{4})\s+(\d{2}):(\d{2}):(\d{2})\.(\d{4})/gi

Or you can sacrificie a few lines of code and use split:

list ($latitude, $longitude) = split (" ", "40:26:46.302N
79:56:55.903W");

And then parse for ':' and for '.', or preg match. Note you can also
do preg_split where you can dump your working regexp to create a list of
values to be used within another script.

Anybody motivated to write PEAR::GeoData?

 

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

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