Caffeine
10-23-2003, 09:23 AM
I've started looking into regExp's but it's a bit messy in my head atm, I could sure use some help!
I want to validate the value of a textbox, with a maxlength of 5.
The value in the textbox should be a time in this format: 14:33,
meaning 9:45 would be incorrect but 09:45 will be correct etc.
So... the first 2 values of the textbox has to be numeric, >= 00 and <= 24, the 3rd character has to be a :[colon] and the next 2 following characters has to be numeric, >= 00 and <= 59.
Sure I could do this with substring's, but I'm [slowly] learning regExp's and I'm thinking it'd more efficient, but I don't really know where to start :confused:
thanks in advance,
I want to validate the value of a textbox, with a maxlength of 5.
The value in the textbox should be a time in this format: 14:33,
meaning 9:45 would be incorrect but 09:45 will be correct etc.
So... the first 2 values of the textbox has to be numeric, >= 00 and <= 24, the 3rd character has to be a :[colon] and the next 2 following characters has to be numeric, >= 00 and <= 59.
Sure I could do this with substring's, but I'm [slowly] learning regExp's and I'm thinking it'd more efficient, but I don't really know where to start :confused:
thanks in advance,