User Tools

Site Tools


resources:emacs_resources

This is an old revision of the document!


<2015.6.24>

Regular expressions

(“regexps,” “regexp,” “regex”)

Recipes

Replace single spaces after end of sentence with two spaces.

Type the following:

[M-x] query-replace-regexp [RET]
\. \([A-Z]\) [RET]
.  \1 [RET]

ADC used when writing SPM table report tool

(from here)

In output file (“taldaemon_i_plus.td.txt” e.g.), AC used emacs regexp (regular expression) to reformat BA's, and just copied a rectangle to get region descriptions:

Replace regexp (default Brodmann area.\([0-9]+\) → BA\1):

and then

Replace regexp (default ^.*BA\([0-9]?\).* → BA\1):

resources/emacs_resources.1435157380.txt.gz · Last modified: (external edit)