Regular Expressions 101

Community Patterns

remove n lines after matching pattern

2

Regular Expression
PCRE (PHP <7.3)

/
^([\s\S]*?)\n#Guest(?:\n.*){3}
/
g

Description

stackoverflow question

Submitted by irom77 - 9 years ago