Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^((\d+)d)?((\d+)h)?((\d+)(?:min|m))?((\d+)s)?$
"
gm

Description

Detects a number of days, hours, minutes, and/or seconds for a Python regex to handle.

Submitted by anonymous - 4 years ago