I have a file with the following pattern:
A = 1
B = 2
C = 3
A = 10
B = 20
C = 30
I would like match only the line break before A = *
My attempt would also matches A = * as well as the line break
Code:
[\r\n]+.*A.*
But I only need the line break alone. I also understand the first A would get sacrificed as there is no like above it.
Is it possible to use lookbehind?
EDIT: My attempt works but leave 2 groups which I can just access group 2. I was hoping to get this done in only 1 group
([.*\r\n])(.*A.*)