From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: renato.pontefice@gmail.com Newsgroups: gmane.emacs.help Subject: Re: regexp on emacs how to... Date: Mon, 1 Sep 2014 03:11:17 -0700 (PDT) Message-ID: <0f557f31-c018-4844-b852-d8be48dda000@googlegroups.com> References: <87wq9p62se.fsf@gmail.com> <941334fe-5c17-4777-aa91-312533ae0500@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1409566526 6376 80.91.229.3 (1 Sep 2014 10:15:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2014 10:15:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 01 12:15: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 1XOOdq-0003Gs-9T for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 12:15:18 +0200 Original-Received: from localhost ([::1]:59148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOOdp-0007V8-IO for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 06:15:17 -0400 X-Received: by 10.182.29.65 with SMTP id i1mr14308919obh.30.1409566277727; Mon, 01 Sep 2014 03:11:17 -0700 (PDT) X-Received: by 10.140.102.104 with SMTP id v95mr58857qge.6.1409566277699; Mon, 01 Sep 2014 03:11:17 -0700 (PDT) Original-Path: usenet.stanford.edu!r2no11940537igi.0!news-out.google.com!q8ni8qal.1!nntp.google.com!dc16no209855qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2.118.42.225; posting-account=u2YPPQoAAAD4EIiLgz2UEPmFMncWw22R Original-NNTP-Posting-Host: 2.118.42.225 User-Agent: G2/1.0 Injection-Date: Mon, 01 Sep 2014 10:11:17 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:207280 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:99557 Archived-At: 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