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: Another replace regexp with list question Date: Tue, 11 Jun 2013 15:13:59 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1370988872 26159 80.91.229.3 (11 Jun 2013 22:14:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Jun 2013 22:14:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 12 00:14:33 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 1UmWpj-00046F-Ly for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Jun 2013 00:14:31 +0200 Original-Received: from localhost ([::1]:49338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmWpj-0006gS-7G for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Jun 2013 18:14:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmWpH-0006Kq-L2 for help-gnu-emacs@gnu.org; Tue, 11 Jun 2013 18:14:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmWpE-0004b7-OL for help-gnu-emacs@gnu.org; Tue, 11 Jun 2013 18:14:03 -0400 Original-Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]:35978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmWpE-0004av-HQ for help-gnu-emacs@gnu.org; Tue, 11 Jun 2013 18:14:00 -0400 Original-Received: by mail-ee0-f48.google.com with SMTP id b47so3291527eek.7 for ; Tue, 11 Jun 2013 15:13:59 -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=WDUztrn7AkVHHQpDRcqSv2qQzulzjNbFWod5nXzzupw=; b=Cffq4siVVvgI6cRME2baL9xGIrX9Kbvxl/t7o1LnZsunDSaY0Y6S0CUwirZOjXUnQR yo0VZQnAHocm7SbopeUv0Sl7TLMZQdZoJyh40ZGMAnxhdVXaZ6j4VAMbKeW8UBuDS4PK I9q6rTHOHwFU7vmgxHk2KuparAs+IsU13sno5RpgBwsgwn3px5M1o65s9ryFSYR271YY cqG3W/PVgQuphwpqQmTIDHZT+O0+oq9NPnkIYzzieYC3rPH50Atgi6A4sdxK/kaeme3n IdVB1YKZQfxSfQiy611lods6eT08eA8pqK1uvkc7o+H9/sL9mqD5cEqHgmaQ/1pnru62 awrA== X-Received: by 10.14.241.136 with SMTP id g8mr5584350eer.104.1370988839356; Tue, 11 Jun 2013 15:13:59 -0700 (PDT) Original-Received: by 10.14.175.2 with HTTP; Tue, 11 Jun 2013 15:13:59 -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::230 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:91467 Archived-At: Oh, thanks!... I already solved the problem using keyboard macros, as Barry suggested, but it is always good to learn!.. :) I will try out the multiple narrowings and the replace-regexp suggestions. Thanks!.. Leandro On Tue, Jun 11, 2013 at 11:23 AM, Sean McAfee wrote: > Leandro Marcolino writes: > > This time I am trying to find occurrences of: > > > > "私私私私", but > > the number of 私 can change from 1 to many. > > > > And I want to replace each 私 of the list to a white space (besides > > removing the clause). So, if there were x "私", I need x " > ". > > Replace: \(\)\(\(?:私\)+\)\(\) > With: \1\,(make-string (/ (length \2) 8) ? )\3 >