Regex expression for timestamp with or without leading zero?
I'm struggling with Regex.
This is a sample timestamp: 00:00:00.00 (Hour, Minutes, Second.Decimal). I
also want this value to match 00:0:0.00 Notice that the leasing zero is
optional in the center.
I was using this: [1-60]:[1-60]:[1-60].[1-100], but that requires no
leading zero. I would like help with making a SINGLE regex that works for
both of the things listed above.
A complete solution would be fantastic, but if you could just point me in
the right direction, that would be helpful as well.
 
No comments:
Post a Comment