From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: multiline regex mode? Date: Fri, 24 Nov 2006 22:14:24 +0100 Organization: The Church of Emacs Message-ID: <87u00o1r9r.fsf@hans.local.net> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1164404580 3960 80.91.229.2 (24 Nov 2006 21:43:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Nov 2006 21:43:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 24 22:42:56 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gniom-0002Rj-QC for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Nov 2006 22:42:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gniom-0004Fq-7p for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Nov 2006 16:42:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GnikI-0000jg-W7 for help-gnu-emacs@gnu.org; Fri, 24 Nov 2006 16:38:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GnikG-0000hv-Ur for help-gnu-emacs@gnu.org; Fri, 24 Nov 2006 16:38:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GnikG-0000hg-Mm for help-gnu-emacs@gnu.org; Fri, 24 Nov 2006 16:38:04 -0500 Original-Received: from [212.227.126.188] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GniVN-0004cQ-Qy for help-gnu-emacs@gnu.org; Fri, 24 Nov 2006 16:22:43 -0500 Original-Received: from [84.167.32.246] (helo=duenenhof-wilhelm.de) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1GniVL3pft-0005Rk; Fri, 24 Nov 2006 22:22:40 +0100 Original-Received: by duenenhof-wilhelm.de (Postfix, from userid 1000) id C0885757EE; Fri, 24 Nov 2006 22:14:24 +0100 (CET) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Thu\, 23 Nov 2006 14\:25\:36 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d7ab225b98a136e1c2910381f940ecb9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38938 Archived-At: Stefan Monnier writes: >> Is it possible to have .* match over a new line? > >> I'd like to be able to match >> {foo} >> and >> { >> foo >> } > >> with a regex of the form {.*} without having to specify the line >> break. > > For this particular request, yes you can: "{[^}]*}". > The "." char in a regexp is just a shorthand for "[^\n]". > If you want the {..} to be balanced, then regexps are not the answer. Just for completeness: where to look for the answer? In AWK, Perl, an Elisp function on the Emacs wiki? Thanks -- Best wishes H. Dieter Wilhelm Darmstadt, Germany