Click to See Complete Forum and Search --> : allow chars & ints


tjock
04-18-2003, 09:50 AM
A simple question - I have a validator that only allows ints (numbers) in the following format: 123-123-1234, but I need to modify the following to allow chars & ints between the dashes. What should I replace the \d with?

Budget_Number.match(/^(\d{3})-?\d{3}-?\d{4}$/);

jeffmott
04-18-2003, 12:03 PM
Replace \d with...[a-zA-Z0-9]

tjock
04-21-2003, 09:34 AM
thanks