[Top][All Lists]

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

RE: using non-Emacs regexp syntax

From: Drew Adams
Subject: RE: using non-Emacs regexp syntax
Date: Wed, 29 Nov 2006 18:11:05 -0800

> > I don't know any other matcher where dot matches a newline.  Quite
> > more relevant would be inverse character ranges like [^A-Z] that do
> > _not_ match newline by default.
> As far as I remember, Perl regexp syntax has a flag to
> match or not match newline by default.

Exactly. This (perl's "single-line" mode) was mentioned in the thread I
cited, as well as the reason (use) for such a feature for Emacs.

> Emacs could adopt a similar flag facility,
> or use native flag variables (like `case-fold-search',
> just with a different meaning.)

Juri proposed a simple implementation: 'setting a new variable
`search-dot-regexp' to "\\(.\\|[\\n]\\)".'

Please see the (3-message) thread. This would be very handy for interactive
use of regexps, IMO, especially with a toggle command (bound to, say,

reply via email to

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