From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: using non-Emacs regexp syntax Date: Wed, 29 Nov 2006 21:13:19 +0200 Message-ID: <200611292113.19747.pogonyshev@gmx.net> References: <85odqqdv5p.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164827892 21114 80.91.229.2 (29 Nov 2006 19:18:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2006 19:18:12 +0000 (UTC) Cc: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 29 20:18:10 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GpUvt-00088x-2P for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2006 20:17:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpUvs-0001UE-8N for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2006 14:17:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GpUoa-0004Kj-8Q for emacs-devel@gnu.org; Wed, 29 Nov 2006 14:09:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GpUoZ-0004Ji-J5 for emacs-devel@gnu.org; Wed, 29 Nov 2006 14:09:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpUoZ-0004JH-E8 for emacs-devel@gnu.org; Wed, 29 Nov 2006 14:09:51 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1GpUoY-0004Hv-EL for emacs-devel@gnu.org; Wed, 29 Nov 2006 14:09:51 -0500 Original-Received: (qmail invoked by alias); 29 Nov 2006 19:09:31 -0000 Original-Received: from unknown (EHLO [80.94.230.71]) [80.94.230.71] by mail.gmx.net (mp016) with SMTP; 29 Nov 2006 20:09:31 +0100 X-Authenticated: #16844820 Original-To: emacs-devel@gnu.org User-Agent: KMail/1.7.2 In-Reply-To: <85odqqdv5p.fsf@lola.goethe.zz> Content-Disposition: inline X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63062 Archived-At: David Kastrup wrote: > "Drew Adams" writes: > > >> Is there a function to convert non-Emacs regexps (e.g. "ab(c+|d)" to > >> Emacs regexps (example to "ab\(c+\|d\)")? > >> > >> The first form appears to be an "extended regexp" or egrep-style regexp. > >> The second appears to be a "basic regexp" or grep-style regexp. > >> > >> This conversion feature in Lisp would be useful to add after the release. > > > > Very glad to hear that. > > > > I'm hoping there will also be support for toggling the newline sensitivity > > of dot. This means a "doc-matches-newline" mode (aka "single-line" mode) > > where `.' will also match newline. Please see the thread "short regexp to > > match any character?" from 2006/03/04 and 03/11. > > 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. Emacs could adopt a similar flag facility, or use native flag variables (like `case-fold-search', just with a different meaning.) Paul