From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Regex replace for numbers Date: Fri, 03 Oct 2014 01:33:58 +0100 Message-ID: <87zjdexa89.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412296487 1638 80.91.229.3 (3 Oct 2014 00:34:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2014 00:34:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 02:34:38 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 1XZqpR-0002QL-GQ for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 02:34:37 +0200 Original-Received: from localhost ([::1]:36999 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZqpQ-0005bX-LW for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Oct 2014 20:34:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZqoz-0005V2-Fv for help-gnu-emacs@gnu.org; Thu, 02 Oct 2014 20:34:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZqor-0004Te-7b for help-gnu-emacs@gnu.org; Thu, 02 Oct 2014 20:34:09 -0400 Original-Received: from outbound-smtp01.blacknight.com ([81.17.249.7]:39158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZqor-0004TU-1d for help-gnu-emacs@gnu.org; Thu, 02 Oct 2014 20:34:01 -0400 Original-Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp01.blacknight.com (Postfix) with ESMTP id A3C1B98F22 for ; Fri, 3 Oct 2014 00:32:00 +0000 (UTC) Original-Received: (qmail 6965 invoked from network); 3 Oct 2014 00:33:59 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.111.239]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 3 Oct 2014 00:33:59 -0000 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.7 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:100238 Archived-At: I'm not very good with Emacs regex, I need to search-and-replace on some numbers. How can I detect unnecessary zeros at the end of a number and chop them off? E.g. turn 567.45000 to 567.45 without also turning 6700 to 67. BR, Robert Thorpe