Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:[0][x][0-9A-F]{2}[,]\s){7}[0][x][0-9A-F]{2}$
/
g

Description

Match a verbose, comma delimited, 64-bit hexadecimal, as sent by an ESP32, via the DallasTemperature getAddress method, for a DS18B20 temperature sensor. Used in Google Sheets, or Excel, Data Validation, after copying and pasting the input string from the Serial Monitor. The ESP32 interrogates the sensor, after soldering, to verify it works, prior to installation.

Submitted by CharlesMartel732 - 7 months ago