Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
((?<ID>\d+)\s(?<LunName>[a-zA-Z0-9_]+)\s+(?<ProvisionType>tpvv)\s(?<vvType>base)\s(?<CopyOf>---)\s+(?<BsId>\d+)\s+(?<ReadWrite>RW|RO)\s(?<State>normal|degraded)\s+(?<Adm>\d+)\s+(?<Snp>\d+)\s+(?<Usr>\d+)\s+?(?<VSize>\d+))
/
g

Description

parses the ssh output of a 3par SSH showvv command

Submitted by 3nbin - 9 years ago