Regular expressions: Difference between revisions

From Cor ad Cor
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:


find capital letter at the end of a line, insert period before newline
find capital letter at the end of a line, insert period before newline
:<pre>(\s[[:upper:]])\n
<pre>(\s[[:upper:]])\n


\1\.^p
\1\.^p

Revision as of 09:39, 24 January 2019

Find capital letter, period, space, capital letter, period.

([A-Z]\.)[ ]([A-Z]\.)

Kill the space by using this for the replacement field:

$1$2

Perl: find uppercase words.

 \b[[:upper:]]{2,}\b

find capital letter at the end of a line, insert period before newline

(\s[[:upper:]])\n

\1\.^p


Links