[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inserting spaces after/before braces...
From: |
Peter Dyballa |
Subject: |
Re: Inserting spaces after/before braces... |
Date: |
Tue, 19 Apr 2005 12:46:30 +0200 |
Am 19.04.2005 um 12:05 schrieb Peter Dyballa:
What about: (replace-regexp "\([()]\) *" "\1 ")?
I think this is not exact, since "x)" wouldn't become "x )" -- maybe
this is it:
(replace-regexp " *\([()]\) *" " \1 " )
which is better, but ") )" would become ") )": two stages/cases then?
Either (replace-regexp " *\([()]\) *" " \1 " ) + (replace-regexp " *" "
" )
or (replace-regexp "( *" "( " ) + (replace-regexp " *)" " )" )
which is: either expand + run length compression, or expand this +
expand that too.
--
Greetings
Pete
"One person with a belief is a social power equal to ninety-nine who
have only interests." - John Stuart Mill