Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?<first><<<<<<< HEAD\n.*?)(?<========)|(?<second>(?=>>>>>>>).*?\n)
/
gs

Description

Removes the merge conflict syntax and our content
>>>>>>
our content...
======
their content
<<<<<< commit name
Submitted by anonymous - 5 years ago