Ling F. Zhang wrote:
I have this question working in vi, but I suppose it's
generally enought for all regexp.
How do I match across line? I would like to find the
end to a sentence by looking for \.$^[A-Z], but it
doesn't work. What is the correct way of match across
two different lines.
How about \.\_s*[A-Z] - this should match inner ends of sentences
too? It also looks that \.\n[A-Z] works, too.
In the same spirity, How should I
replace by inserting a \r or \n, i.e.
This is sentence one. This is sentence two.
becomes
This is sentence one.
This is sentence two.
In substitution pattern press Ctr-V and then Enter. It should be
replaced by something like ^M, i.e:
:%s/\.\s\+\([A-Z]\)/.^M\1/gc