Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
([01]?[0-9]|2[0-3])(-([01]?[0-9]|2[0-3])(\/[0-9]*)?)?(,([01]?[0-9]|2[0-3])(-([01]?[0-9]|2[0-3])(\/[0-9]*)?)?)*
"
g

Description

Example 0,2,3,5-6,9-23/2

Submitted by anonymous - 8 years ago