GREP style formatting a line preceded/followed by another line in Indesign CC 2017
Hello all,
I'm having hard time devising a working GREP expression to format a calendarium I'm working on.
I have a text field structured as follows:
...
M(tab)(some number)
T(tab)(some number)
W(tab)(some number)
T(tab)(some number)
F(tab)(some number)
S(tab)(some number)
S(tab)(some number)
M(tab)(some number)
T(tab)(some number)
W(tab)(some number)
T(tab)(some number)
F(tab)(some number)
S(tab)(some number)
S(tab)(some number)
...
And this pattern repeats for the whole month. The numbers obviously start at 1 and go to 28-31 (e.i. some are single digit, others are double digit).
I want to put an underscore between the second S (Sunday) line and the M (Monday) line, so that it separates them, say like this:
...
M(tab)(some number)
T(tab)(some number)
W(tab)(some number)
T(tab)(some number)
F(tab)(some number)
S(tab)(some number)
S(tab)(some number)
M(tab)(some number)
T(tab)(some number)
W(tab)(some number)
T(tab)(some number)
F(tab)(some number)
S(tab)(some number)
S(tab)(some number)
...
But whatever I try InDesign GREP option in the Paragraph style it refuses to understand me.
If I just do:
S\t\d+
Obviously works but underscores both Saturday and Sunday lines.
Here are some examples of the many GREP expressions I've tried the past two days with no success:
(?<=S\t\d+\r)S\t\d+
(?<=^S\t\d+\r)S\t\d+
(?<=S\t\d+$)S\t\d+
(?<=^S\t\d+$)S\t\d+
(?<=S\t\d+~b)S\t\d+
S\t\d+\r(?=M)
S\t\d+~b(?=M)
What am I missing?
