Regular Expressions 101

Community Patterns

lsblk output parser

1

Regular Expression
PCRE (PHP <7.3)

/
^((sdf|xvd)[a-x][0-9]{0,1})\s+[^\s]+\s+[^\s+]\s+([^\s]+)\s+[^\s]+\s+[^\s]+\s+([^\n]*)$
/
misU

Description

Parses lsblk output

Submitted by Aaron Peterson - 8 years ago