My input file looks something like this

```
Start1
some text
that I want
modified
Pattern1
some other text
which I do not want
to modify
End1

Start1
Pattern2
End1

```

My sed pattern looks like this

```
/Start1/,/Pattern1/c\
Start1\
Modification text here\
Pattern1\
additional modifications

```

I only want the text within the first range of `Start1` and `End1` modified.
Additional, I am also specifying `Pattern1` which does not exist in the second range.

I run

```
sed -i -f <sed_file> <input_file>

```

However, my output is given below. For some reason it wipes out the second range even though `Pattern1` does not exist in it.

```
Start1
Modification text here
Pattern1
additional modifications
some other text
which I do not want
to modify
End1

```

Expected result

```
Start1
Modification text here
Pattern1
additional modifications
some other text
which I do not want
to modify
End1

Start1
Pattern2
End1

```