Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(id='.*?') (srcDocId='.*?')
/
gi

Description

Identifies two groups, each group using a regex, then replaces group 2 with group 1.

Submitted by Stuart Shannon - 9 years ago