help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: replacing phrases: matching line feeds in regular expressions, since


From: jeremiah . dodds
Subject: Re: replacing phrases: matching line feeds in regular expressions, since \s- doesn't work
Date: Sat, 18 Feb 2012 22:04:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Silvio Levy <levy@msri.org> writes:

> It seems to work for me with 'foo[\s^J]+bar' (no hyphen in the
> character class -- the hyphen is for a range, like [a-z])
>
> Silvio

Ahh, right. '\s-' *does* match characters with a whitespace syntax, but
since it's in a character alternative the '-''s meaning as a
range-definer takes precedence.

As an aside, there are ... a lot of edge cases in the Special Characters
in Regular Expressions info node for elisp, even for docs for a regular
expression implementation. It might actually serve the purpose of
pushing people towards writing functions and using other methods for
non-trivial editing tasks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]