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

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

Regexps: matching any character INCLUDING newline


From: florian
Subject: Regexps: matching any character INCLUDING newline
Date: Sat, 28 Mar 2009 06:35:05 -0700 (PDT)
User-agent: G2/1.0

I know, this has been asked before (and I have read some answers), but
it still seems worth asking:

I've just run into a regexp matching problem that turned out to be due
the the fact that '.' matches any character except newlines. While
e.g. Perl has similar behaviour, but also a switch to change it, I
have been unable to find out how to do this in Emacs lisp.

The shortest expressions I (and the answers I read) can think of all
use alternation, such as:

\(.\|\n\)

or

\(\n\|[^\n]\)


Are there any better solutions (without using an additional library,
that is) ... ??

Thanks for any suggestions!

Florian


reply via email to

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