From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leandro Marcolino Newsgroups: gmane.emacs.help Subject: Re: Replace regexp question Date: Sat, 8 Jun 2013 09:46:25 -0700 Message-ID: References: <1370671883916-288179.post@n5.nabble.com> <87zjv0lqqp.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1370710906 11563 80.91.229.3 (8 Jun 2013 17:01:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Jun 2013 17:01:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 08 19:01:48 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 1UlMWR-0000tx-Qp for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Jun 2013 19:01:48 +0200 Original-Received: from localhost ([::1]:58009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlMWR-0002EY-GE for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Jun 2013 13:01:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlMHc-0000H8-WE for help-gnu-emacs@gnu.org; Sat, 08 Jun 2013 12:46:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UlMHa-0006rJ-7n for help-gnu-emacs@gnu.org; Sat, 08 Jun 2013 12:46:28 -0400 Original-Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:51025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UlMHZ-0006rE-UG for help-gnu-emacs@gnu.org; Sat, 08 Jun 2013 12:46:26 -0400 Original-Received: by mail-ee0-f49.google.com with SMTP id b57so2187475eek.22 for ; Sat, 08 Jun 2013 09:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=aULnbo03O9fJRkX9QFCCQj5mNsJVbntw7CHb6k8PxaQ=; b=yxLX48Z+nQ1lfYQx4BwoHPCn/1EDoLcOCXBSsHlemU028iOBKdp9h1LlLBFQ5935hn aV4172OsL16eZruiGd+mGE1oUXm+YTmj76Di4YpgiR3Vw3HQdowz45uS14afZChEx14v CRjMnwFMuQnZtpVsFLdx3HInwMTPDYm339P5Ex40Jx1Hw6zo6CI3J+444eMpdYNeqxFV HEtK3ENT5xG0lR0bZsNlHPV2m5RFccNzTwS2ZGIf3NHYRrHngbme2uInrjE6uLmu2xsx HRC4RY6RzgV2smNj2ccU3xeMwvEpNMpRVAYXm2ArNMs/DtCuNigzdKR+qF6QhlQg3IG4 ssTg== X-Received: by 10.14.182.5 with SMTP id n5mr3551760eem.151.1370709985103; Sat, 08 Jun 2013 09:46:25 -0700 (PDT) Original-Received: by 10.14.175.2 with HTTP; Sat, 8 Jun 2013 09:46:25 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::231 X-Mailman-Approved-At: Sat, 08 Jun 2013 13:01:31 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:91399 Archived-At: Just to be clear, when I say replace by: "私私私 wrote: > Thank you very much for all the replies!.. :) But, maybe my example was > too simplistic.... hehe > > I want to file occurrences of " >私私私 私 can be one or more, and replae by " style=3D'letter-spacing:-5px'>私私私 lang=3DPT-BR". > > If I try: "\(私+\) = lang=3DZH-CN style=3D'letter-spacing:-5px'>\1 pattern is found > If I try: "\(私\)+ = lang=3DZH-CN style=3D'letter-spacing:-5px'>\1 sequence of 私 changes to a single 私. > > Is there a way to solve this problem?... > > Thank you very much!.. > > Thanks, > Leandro > > > On Sat, Jun 8, 2013 at 8:11 AM, Pascal J. Bourguignon [via Emacs] < > ml-node+s1067599n288199h15@n5.nabble.com> wrote: > >> Leandro Marcolino <[hidden email]> >> writes: >> >> > Hello, all!.. >> > >> > I am trying to add text after multiple occurrences of a group, but it >> is not >> > working. For example, if I try to change the following: "aaaaaa" to >> > "aaaaaab", I end up with "ab"... >> > >> > I am looking for the regexp: \(a\)+ and I replace by \1b. But then the >> > sequence of a's is reduced to a single "a". How can I make the final >> text >> > have the same number of occurrences of the group as the original >> text?.. >> >> That's because there is a single a inside \( \)! >> Try: \(a+\) -> \1b >> >> -- >> __Pascal Bourguignon__ http://www.informatimago.com/ >> A bad day in () is better than a good day in {}. >> You can take the lisper out of the lisp job, but you can't take the lisp >> out >> of the lisper (; -- antifuchs >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> >> http://emacs.1067599.n5.nabble.com/Replace-regexp-question-tp288179p2881= 99.html >> To unsubscribe from Replace regexp question, click here >> . >> NAML >> > >