Regular Expressions 101

Match verbose, comma delimited, 64-bit hexadecimal, as sent by an ESP32 via the DallasTemperature getAddress method, for DS18B20 temperature sensors.

Open Workspace
  • PCRE2 (PHP)
  • Match
1

Regular Expression

/
^(?:[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