Regular Expressions 101

Parse OBIS Data

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 - 7 months ago (Last modified 7 months ago)