question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RegEx for 24 hour time only allowing 0 as input

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
anacoimbragcommented, May 7, 2018

I am having the same problem, was anyone able to resolve it?

2reactions
macin40commented, Oct 24, 2018

I am having the same problem, was anyone able to resolve it?

Did anyone find the solution?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found