RegEx for 24 hour time only allowing 0 as input
See original GitHub issueI am not sure if i am implementing the RegExp
right but this is what i have at the moment:
patterns="{ {pattern: new RegExp([0-9]{1,2}:[0-5][0-9])|([0-9]{1,2}\.[0-9]{1,2}), true}}" mask="00:00"
This is only allowing me to type 00:00 rather than 23:59 for example.
Any help would be much appreciated
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to validate time in 24-hour format using Regular Expression
Given a string str, the task is to check whether the string is valid time in 24-hour format or not by using Regular...
Read more >4.6. Validate Traditional Time Formats - Regular Expressions ...
On a 24-hour clock, if the first digit is 0 or 1, the second digit allows all 10 digits, but if the first...
Read more >Regular expression for matching time in military (24 hour) format
This should do it: ^([01]\d|2[0-3]):?([0-5]\d)$. The expression reads: ^ Start of string (anchor) ( begin capturing group [01] a "0" or "1" \d...
Read more >How to validate Time in 24 Hours format with regular expression
The 24-hour clock format is start from 0-23 or 00-23 then a semi colon (:) and follow by 00-59. Java Regular Expression Example....
Read more >Advanced Search - Regular Expression Library
Matches times seperated by either : or . will match a 24 hour time, or a 12 hour time with AM or PM...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am having the same problem, was anyone able to resolve it?
Did anyone find the solution?