regex - Emacs regexp replace situation -
on emacs
let have text:
abcd abcd. 23
. 2
important catching
with \. [[:digit:]]
can catch pattern how replace without .
output should abcd abcd 23
.
you use capturing groups retain numeral.
replace regexp: \. ([[:digit:]]) replace regexp with: \1
the \1
refers numeral captured using ([[:digit:]])
.
Comments
Post a Comment