From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: suvayu ali Newsgroups: gmane.emacs.help Subject: Regex is not being as "hungry" as it is supposed to Date: Thu, 5 Aug 2010 18:37:22 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1281058699 6668 80.91.229.12 (6 Aug 2010 01:38:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Aug 2010 01:38:19 +0000 (UTC) To: Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 06 03:38:18 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OhBsx-0006bE-P5 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Aug 2010 03:38:12 +0200 Original-Received: from localhost ([127.0.0.1]:46811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhBsw-0005Kh-UD for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Aug 2010 21:38:10 -0400 Original-Received: from [140.186.70.92] (port=60302 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhBsW-0005Kc-JN for help-gnu-emacs@gnu.org; Thu, 05 Aug 2010 21:37:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OhBsV-0006Ki-JW for help-gnu-emacs@gnu.org; Thu, 05 Aug 2010 21:37:44 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:64869) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhBsV-0006KU-DP for help-gnu-emacs@gnu.org; Thu, 05 Aug 2010 21:37:43 -0400 Original-Received: by wwi14 with SMTP id 14so8481152wwi.30 for ; Thu, 05 Aug 2010 18:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=Y4Lc6TMaR+YoJm5sYxa6uqkok2vsTR2I4lKDLOcsz7Y=; b=jgXvYTWp5tpYRPnQ4UmAzYackqihz0LfQ3N86Wg4A0uufiv4pt8uBGA9cIwRpfzPaF yqoLS669hDT0xzcYVc+J1pKBIrt2vIz+4AKw6DgHM29UgoPEVoSz/wq3/Ege3Lt/Q1pA r7rZEXpADub9O9tR8cdakfTIMzA7dYsUvyxFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=JtR8FBbfOk5DIbleHEYPDFFxo/+N4ni8kVrD6xCvr+jNbESQQx1Zsq+bpNuNkR5Bcv hBfFYEfTa7k/XgBAM9EmPWo26A4sIKr3s4Vbp/lCPgnNqzAae/5cO0qnjf3ZwDOn8H1H I5LxdtEEdjDifAuKKN4OfRBmtpTrBjb6LzDJ8= Original-Received: by 10.216.234.76 with SMTP id r54mr266137weq.96.1281058662317; Thu, 05 Aug 2010 18:37:42 -0700 (PDT) Original-Received: by 10.216.234.154 with HTTP; Thu, 5 Aug 2010 18:37:22 -0700 (PDT) X-Google-Sender-Auth: 9ry7j78WrSwi_iKUlz_jkmUz0ig X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:74462 Archived-At: Hi everyone, I have a strange problem, recently some of my regexps started becoming less "hungry" than usual. For example I have a file like this, #1 153030 120 = 423988 #2 152845 181 = 1500234 #3 155160 247 = 767821 #4 155160 310 = 11131347 #5 155160 319 = 13979167 I wanted to remove the 3rd column of numbers along with the = sign. So I called `query-replace-regexp' with this regexp replacement, `[0-9]+ = ->' But this matches the numbers like this, 120 = 1 = 7 = 0 = 9 = where as I am expecting it to be this, 120 = 181 = 247 = 310 = 319 = This is just one instance, I have faced similar other cases. I get the proper expected match only for the first match, for the subsequent matches the regexp becomes less "hungry". Is this a consequence of some conflicting settings or a possible bug? I see this behaviour with GNU Emacs 24.0.50.1, emacs-snapshot from an Ubuntu Lucid ppa and emacs compiled from source on Fedora 12. (but the settings are identical for both these setups) Thanks in advance for any comments/hints about this issue. :) -- Suvayu Open source is the future. It sets us free.