Regular Expressions 101

Community Patterns

Community Library Entry

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 - 5 years ago