Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^\s*(?<name>[^|]+?)\s*\|\s*(?<value>[^|]+?)\s*\|\s*(?<unit>[^|]+?)\s*\|\s*(?<status>[^|]+?)\s*\|\s*(?<type>[^|]+?)\s*\|\s*(?<state>[^|]+?)\s*\|\s*(?<lower_nonrec>[^|]+?)\s*\|\s*(?<lower_crit>[^|]+?)\s*\|\s*(?<lower_noncrit>[^|]+?)\s*\|\s*(?<upper_crit>[^|]+?)\s*$
/
gm

Description

Parse stdout from ipmitool sensor

Submitted by anonymous - 10 months ago (Last modified 10 months ago)