In vim, I'm trying to match all lines that has ^A.
but not followed by a B.
on the next line.
I'm matching it with /\v^A\. .*$\n[^B]
.
This correctly identifies the relevant portion in question 2., but not in question 3. I'm not able to figure out why. The ending matches \n\n
. And [^B]
should match \n
but it doesn't. What am I doing wrong?
1. Hello?
A. aaaaaaaa
B. bbbbbb
C. ccccccc
D. ddddd
2. Hello?
A. aaaaaaaa B. bbbbbb
C. ccccccc
D. ddddd
3. Hello?
A. aaaaaaaa B. bbbbbb C. ccccccc D. ddddd
4. Hello?
([^B]|$)
^Hello?[^a][^b][^c][^d]
etc, does not make any sense