Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
^((?P<a>[0-9]{1,3})-)?((?P<b>[0-9]{1,3}):)?(?P<cde>(?P<c>[0-9A-F]{1,3}).(?P<d>[0-9A-F]{1,3})(.(?P<e>[0-9A-F]{1,3}))?)([\*\&](?P<f>[0-9A-F]{1,3}))?\((?P<value>[^*^\)]*)(([\*])(?P<unit>\w*))?\)$
"
gm

Description

Parsing OBIS Data

Submitted by anonymous - a year ago (Last modified a year ago)