my user enters time in the followin format
22:40
now i want to check whether user enters the same format i.e it should not be allowed to enter
22;40 or 22L40 or anything like tat
i need an ereg expression tat can check tat..
anybody can tell me how can i do tat
need ereg expression
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
untested
should allow 2:9 for 02:09 as well, unless you want it strict.. (just remove the ? marks then)
Code: Select all
^(2ї0-4]|ї0-1]?ї0-9]):(ї0-5]?ї0-9])$