Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^\s*(\d{1,3})\s+([\w-]+)\s+(0x[\da-fA-F]{4})\s+(\d{3})\s+(\d{3})\s+(\d+)\s+([\w-]+)\s+(\w+)\s+-\s+(\d+)
/
gm

Description

Regex for smartctl output

Submitted by anonymous - 2 years ago