Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^file *"?([^" ]*)"[\s\S]*?((?:{[\s\S]*?)*?}[\s\S]})
/
gm

Description

Extracts the file name and substitution pattern for each entry in an EPICS substitution file. See https://docs.epics-controls.org/projects/base/en/latest/msi.html#dbloadtemplate-format for a description of the file format being parsed

Submitted by Giles Knap - 3 days ago