Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(sd[a-z]{1,2})|(nvme[0-9]{1,2})|(mmcblk[0-9]{1,2})
/
gm

Description

Filters out all block devices (excluding hd* or vd*)

Submitted by Louwrentius - 2 years ago