4
I’m working with HH:MM:SS and I have this REGEX ^([0-1]?\\d{0,4})(?::([0-5]?\\d))?(?::([0-5]?\\d))?$
I’m using the library Inputmask but I would like to work with negative hours example:
Effort: -200:00:00
I can continue using this regex or have to use another?
Utilize
-?
to indicate that the hyphen at the beginning is optional.^-?(?:[0-9]{0,4}):(?:[0-5][0-9]):(?:[0-5][0-9])$
– Valdeir Psr
It worked thanks @Valdeirpsr
– Fernando Souza
@Valdeirpsr now only post as response to win accepted :)
– Guilherme Nascimento