replacing phrases: matching line feeds in regular expressions, since \s-
replacing phrases: matching line feeds in regular expressions, since \s- doesn't work
Sat, 18 Feb 2012 12:52:15 -0500
Hi emacs gurus,
[I accidentally posted this first to the main emacs forum, pardon my newbness.]
I've spent hours scouring the web trying to solve what should be a simple problem. I appreciate any help!
I want to replace a three-word phrase with an acronym. Should
be easy, right? But of course I want to match across lines. From what I
read '\s-' should match line feeds, but it doesn't. The closest I've
gotten to matching across lines is using 'foo[\s-^J]+bar' (using ^Q to
insert ^J literally), but for some reason that doesn't match 'foo bar' on the same line! I'm out of ideas - what's going on?
I'm using GNU Emacs 23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35).