I need a regex for matching digits from a time format like this:
let time = "12:33".match(/\d{2}(?:\d{2})?/)
but my logs is something like this:
[ '12', index: 0, input: '12:33', groups: undefined ]
the only return is the first match not an array of matches. I even changed my regex for many times. /\d+/
but same result.is it something related with my regex pattern?