ultranerds has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to make sure that the long/lat values pased in only consists of stuff like -4.332423424 , 0, 4.434 , etcif ( ($long > 180 || $long < -180) || ($lat > 90 || $lat < -90) || $long !~ /^([\d\-\.]+)$/ || $lat !~ /^([\d\-\.]+)$/ ) { ..show error here }
....but the regex stuff never seems to match.($long > 180 || $long < -180) || ($lat > 90 || $lat < -90)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Stupid regex question - numerics
by desemondo (Hermit) on Mar 01, 2010 at 11:54 UTC | |
by JavaFan (Canon) on Mar 01, 2010 at 14:52 UTC | |
by ultranerds (Hermit) on Mar 01, 2010 at 12:01 UTC | |
|
Re: Stupid regex question - numerics
by ungalnanban (Pilgrim) on Mar 01, 2010 at 11:58 UTC | |
|
Re: Stupid regex question - numerics
by Fletch (Bishop) on Mar 01, 2010 at 15:04 UTC | |
|
Re: Stupid regex question - numerics
by ungalnanban (Pilgrim) on Mar 01, 2010 at 12:33 UTC | |
|
Re: Stupid regex question - numerics
by ack (Deacon) on Mar 01, 2010 at 21:49 UTC |