This is the input
hai people<PATTERN> we had
<PATTERN>a lot of fun<PATTERN>
writing scri pts
We will<PATTERN>
have more
<PATTERN>tomorrow<PATTERN>
Hurray!
Need to have
hai people<PATTERN> we had
writing scripts
We will<PATTERN>
have more
Hurray!
For me the first pattern match removes using the following command
sed '/PATTERN/{n;/PATTERN/d}' filename