Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Golang

`
(?m)^NAME="(?P<name>(?P<disk>[a-z]+)(?P<partition>\d*))"\sFSTYPE="(?P<fstype>\w*)"\sMOUNTPOINT="(?P<mountpoint>[\w\[\]/]*)"\sSIZE="(?P<size>\d*)"\sTYPE="(?P<type>\w+)"$
`
gm

Description

Trying to adapt this regex to support LVM.

Submitted by anonymous - 3 years ago