Regular expressions: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
:<pre> (\.[[:upper:]])\n </pre> | :<pre> (\.[[:upper:]])\n </pre> | ||
<pre> | |||
\s\(([0-9]{4}) | |||
</pre> | |||
== Links == | == Links == | ||
* [https://www.tutorialspoint.com/perl/perl_regular_expressions.htm Perl Regular Expressions] | * [https://www.tutorialspoint.com/perl/perl_regular_expressions.htm Perl Regular Expressions] |
Revision as of 10:30, 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
find period, capital letter at the end of a line
(\.[[:upper:]])\n
\s\(([0-9]{4})