Q:

Vim - delete until find a pattern, but in reverse direction

I know how to delete a part of text from cursor position to occurence of pattern, I mean d/<pattern>. I am wondering how to delete a part of text before cursor position until occurrence of pattern which is before cursor position.
Being in position x in file:
>>>>
aaaa
===x
bbbb
<<<<

I want to delete
>>>>
aaaa
====

This is work if pattern is exists only once in file... and vim doesn't have a choice. However there is a problem with file like this:
>>>>
aaaa
====
bbbb
<<<<

foo
boo

>>>>
cccc
====
dddd
<<<<

A:

You can search backwards using ?. So to delete back until a pattern, use d?<pattern>.

