Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
(?P<time>\d{8}T\d{6}) (?P<rti>.+) (?P<timestamp>\d+)\s?Bus=\s?(?P<bus>.*?)\s?C=\s?0x(?P<cmd>[0-9a-fA-F]{2})\s?S=\s?(?P<status>\w+)\s?RT=\s?(?P<rt>\d+)\s?RDI=\s?0x(?P<rdi>[0-9a-fA-F]{2})\s?EOT=\s?0x(?P<eot>[0-9a-fA-F]{2})\s?Data=\s?(?P<data>([0-9a-fA-F]{2}\s?)*)\s?REPLY=\s?(?P<reply>([0-9a-fA-F]{2}\s?)*)
"
gm

Description

MBUS regex, with updated speed

Submitted by anonymous - 4 years ago