From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Regexp: match any character including newline Date: Wed, 16 Oct 2013 09:53:52 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1381942461 30803 80.91.229.3 (16 Oct 2013 16:54:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Oct 2013 16:54:21 +0000 (UTC) To: Yuri Khan , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 16 18:54:25 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VWUMX-00009m-NK for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Oct 2013 18:54:21 +0200 Original-Received: from localhost ([::1]:48463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWUMX-00047t-8q for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Oct 2013 12:54:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWUMG-00046s-Nv for help-gnu-emacs@gnu.org; Wed, 16 Oct 2013 12:54:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWUM9-0004PA-0V for help-gnu-emacs@gnu.org; Wed, 16 Oct 2013 12:54:04 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:30813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWUM8-0004Ou-PZ for help-gnu-emacs@gnu.org; Wed, 16 Oct 2013 12:53:56 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9GGrsSs022907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Oct 2013 16:53:55 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9GGrrK2012410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Oct 2013 16:53:53 GMT Original-Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9GGrrcK012405; Wed, 16 Oct 2013 16:53:53 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94045 Archived-At: > =E2=80=9C.=E2=80=9D needs to match any character including newline. > I know the obvious solution: instead of =E2=80=9C.=E2=80=9D, use the foll= owing > monstrosity: > > \(?:.\| > \) >=20 > However, I find that very cumbersome to type, especially since I > have to press C-q C-j in between. >=20 > Is there a way to make =E2=80=9C.=E2=80=9D match newline too, or is there= an easier > way to match any character including newline? 1. I and others have requested this for vanilla Emacs a few times, as a user toggle. E.g.: * http://lists.gnu.org/archive/html/emacs-devel/2006-03/msg00162.html * http://lists.gnu.org/archive/html/emacs-devel/2006-03/msg00476.html * http://lists.gnu.org/archive/html/emacs-devel/2006-11/msg01559.html * http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg00115.html 2. In Icicles at least, you can use `C-M-.' to toggle what `.' represents in the minibuffer (i.e., for most interactive use). When `.' matches also a newline, it appears as `.' in the minibuffer, but the actual regexp used under the covers is "\(.\|[ ]\)". (When this is the case, it is also highlighted, so you can tell.) IOW, when newline is also being matched by `.', this propertized string is inserted in the minibuffer when you type `.': #("\\(.\\|[ ]\\)" 0 10 (face highlight display ".")) Not the ideal solution (hence the requests cited), but handy enough.