Regular Expressions 101

Community Patterns

Check response of a serially connected Bronkhorst flowmeter for a certain range

0

Regular Expression
ECMAScript (JavaScript)

/
:06..0201213(5[C-F]|[6-9A-C].|D[0-3]).
/
gm

Description

Bronkhorst Flowmeters use a somewhat unique protocol for communication. In the ascii protocol the resonse is transmitted as an unsigned integer coded as 4 hexadecimal chiffres. The values are normalized so that 32000 (7D00h) is 100% of the capacitiy of the device.

For my case, valid Values range from 35C0h to 3D3Fh which this RegEx captures.

Submitted by anonymous - 5 years ago