You may use a regex like
^(?:---+Rs*)*(w.*)R---+R(?:h*R)*(w.*)R---+$
And replace with $1:$2
.
The ^
matches the line start, (?:---+Rs*)*
matches optional delimiter lines before the first non-empty line, (w.*)
is Group 1 capturing a word char followed with 0+ chars other than a newline, R---+R
matches a line break followed with 3+ hyphens and a linebreak, (?:h*R)*
matches n number of blank lines, (w.*)
(see above) and R---+$
matches a linebreak and 3+ hyphens at the end of the line.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…