On 8/2/05, Tom Dell'Aringa <pixelmech at yahoo.com> wrote: > Hi, I'm trying to come up with a simple regex that will allow me to test for numbers 0-9 ONLY. The > numbers are held in a variable 'numtext'. I got as far as: > > var match = /[\d\d]/.test(numtext); > > But this is not working. Can someone help out, regex is not my thang..thanks. Try var match=/^[0-9]$/.test(numtext); this checks for 1 digit in the range 0-9 inclusive. -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/