|
Posted by robert on 05/04/06 02:42
| The 'correct' format is either
| 1. 8-15@113.5
| ie a number (an integer between 1 and 500 say), followed by one '-'
| followed by a number (an integer between 1 and 500 say), an @ and a
| number to end (a float between 1 and 10000 say), or
|
| 2. 43@226 ie without the first '8-'
|
| Any guidance as I'm tearing my hair out.!?
/^(\d+-)?\d+@\d+.?\d+$/
this assumes that a dot (.) is your decimal seperator - if currency, some
countries use a comma (,).
anyway, hth.
me
(i've no hair left to pull out...but i know my regex's ;^)
Navigation:
[Reply to this message]
|