Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?P<prop>[\w-]+) # property name (?P<prop_params>; # property params, e.g. dstparams ( [\w/,-]+(=[\w/,-]+)?) # first param key[=val] element (;[\w/,-]+(=[\w/,-]+)?)* # additional key[=val] elements )?: # colon separator between prop and main params (?P<params> # main params ( [\w/,-]+(=[\w/,-]+)?) # first param key[=val] element (;[\w/,-]+(=[\w/,-]+)?)* # additional key[=val] elements )
"
gmx

Description

parses property strings as used by iCalendar. Kinda.

Submitted by anonymous - 3 years ago (Last modified 2 years ago)