jeudi 14 mars 2019

Rgx Pattern Match Time Layout (m s)

I'm not strong in regex pattern matching, but looking for some help. I'm trying to match this pattern using Regex.Match:

  • 5m 26s
  • 3m
  • 42s
  • 7m
  • 4m 02s

I've checked the site and found some help but its not 100% what I'm looking (doesn't capture 3m & 7m or any with these type of values), all other value match.

I piece together: (m\s+)?(?:[1-5]?\ds) as based on my findings

Thanks for any assistance.

Aucun commentaire:

Enregistrer un commentaire