From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=81lvar?= Ibeas Newsgroups: gmane.emacs.help Subject: Re: regexp on emacs how to... Date: Mon, 1 Sep 2014 12:38:46 +0200 Message-ID: <87d2bfr5ft.fsf@alveinte.minas.unican.es> References: <87wq9p62se.fsf@gmail.com> <941334fe-5c17-4777-aa91-312533ae0500@googlegroups.com> <0f557f31-c018-4844-b852-d8be48dda000@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409567966 24518 80.91.229.3 (1 Sep 2014 10:39:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2014 10:39:26 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 01 12:39:19 2014 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 1XOP14-0000wA-SK for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 12:39:18 +0200 Original-Received: from localhost ([::1]:59234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOP14-0002G4-7L for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 06:39:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOP0n-0002FU-98 for help-gnu-emacs@gnu.org; Mon, 01 Sep 2014 06:39:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOP0h-0002l2-81 for help-gnu-emacs@gnu.org; Mon, 01 Sep 2014 06:39:01 -0400 Original-Received: from mhb01.unican.es ([193.144.193.151]:53488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOP0h-0002kU-1Y for help-gnu-emacs@gnu.org; Mon, 01 Sep 2014 06:38:55 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mhb01.unican.es (Postfix) with ESMTP id 2C2965805B4 for ; Mon, 1 Sep 2014 12:38:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at unican.es Original-Received: from mhb01.unican.es ([127.0.0.1]) by localhost (mhb01.unican.es [127.0.0.1]) (amavisd-new, port 10025) with LMTP id 1Lek2t1wk_b1 for ; Mon, 1 Sep 2014 12:38:46 +0200 (CEST) Original-Received: from correouc.unican.es (CAS02.unican.es [193.144.193.214]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mhb01.unican.es (Postfix) with ESMTPS id 65FAC5805C8 for ; Mon, 1 Sep 2014 12:38:46 +0200 (CEST) Original-Received: from alveinte.minas.unican.es (193.144.207.58) by correouc.unican.es (193.144.193.212) with Microsoft SMTP Server (TLS) id 14.3.174.1; Mon, 1 Sep 2014 12:38:46 +0200 X-Originating-IP: [193.144.207.58] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 193.144.193.151 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:99560 Archived-At: MIME-Version: 1.0 Content-Type: text/plain \[-[A-Z]*?[^]A-Z]+?[^]]*?-\] It misses at least those occurrences where the character ] is in the inserted text. Date: Mon, 01 Sep 2014 12:38:30 +0200 In-Reply-To: <0f557f31-c018-4844-b852-d8be48dda000@googlegroups.com> (renato pontefice's message of "Mon, 1 Sep 2014 03:11:17 -0700") Message-ID: <87egvvr5g9.fsf@alveinte.minas.unican.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) --text follows this line-- writes: > ok, this is a right code: > #+BEGIN_EXAMPLE > noscenza e competenza, che in }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f40\fs22\insrsid15731996\charrsid7868964 [-DATE-]}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f40\fs22\insrsid15731996 prot }{\rtlch\fcs1 \af0 \ltrch\fcs0 > \f40\fs22\insrsid15731996\charrsid13987552 [-TIME-]}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f40\fs22\insrsid15731996 Il/la sig > #+END_EXAMPLE > > this is an example with problems > #+BEGIN_EXAMPLE > noscenza e competenza, che in }{\rtlch\fcs1 \af0 \ltrch\fcs0 \f40\fs22\insrsid15731996\charrsid7868964 [-DAT{\rtlch\fcs1 \af0 \ltrchE-]}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f40\fs22\insrsid15731996 prot }{\rtlch\fcs1 \af0 \ltrch\fcs0 > \f40\fs22\insrsid15731996\charrsid13987552 [-TI > ME-]}{\rtlch\fcs1 \af0 \ltrch\fcs0 \f40\fs22\insrsid15731996 Il/la sig > #+END_EXAMPLE > > In the second example, my variable ([-DATE-] and [-TIME-], are interrupted: > - in [-DATE-] variable, by rtf code > - in [-TIME-] variable, by a a line feed > > in both example, the parser that try to substituite variable, fails, becausae it find some dirty text, between the start [- and the end -] of variable. > > So I need to detect that occurence. > The best thing would be to detect JUST the occurence of variable that are not well formatted (as in example 1 > > I think regexp could do that, but I don't know how... > > Renato