I have the following output:
WordA
1
2
3
4
WordB
5
6
7
8
WordC
9
10
11
12
WordA
13
14
15
16
WordB
I need to grab the numbers between the two words: WordA and WordB
I tried (?<=WordA ).*(?= WordB)
but the problem is, it grabs ALL the numbers here, including the ones between WordC and WordA that I don't want. I only want to grab the numbers between the 2 pairs which are 1 2 3 4
and 13 14 15 16
Any ideas?