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]
|