Regular Expressions 101

Community Patterns

scst.conf parser - TargetDriver

0

Regular Expression
PCRE (PHP <7.3)

/
^ TARGET_DRIVER\s+(?P<target_driver>[^\s]+)\s+ (?P<target_content>[\s\S]+?) (?=^HANDLER|^TARGET_DRIVER|\Z)
/
gmx

Description

Parse a portion of the SCST conf file. This separates the TARGET_DRIVER into a named 'target_driver' and 'target_content'

Submitted by anonymous - 4 years ago