From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: AngusC Newsgroups: gmane.emacs.help Subject: regex: \(.*\)\([a-zA-Z]+\)$ - not working as expected Date: Wed, 25 Mar 2015 05:27:08 -0700 (MST) Message-ID: <1427286428315-353090.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1427286496 3887 80.91.229.3 (25 Mar 2015 12:28:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Mar 2015 12:28:16 +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 Mar 25 13:28:07 2015 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 1YakPf-00031I-WD for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2015 13:28:00 +0100 Original-Received: from localhost ([::1]:38744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YakPf-0006J4-7J for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2015 08:27:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YakPS-0006Iz-Ki for Help-gnu-emacs@gnu.org; Wed, 25 Mar 2015 08:27:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YakPN-0005Qp-7F for Help-gnu-emacs@gnu.org; Wed, 25 Mar 2015 08:27:46 -0400 Original-Received: from mwork.nabble.com ([162.253.133.43]:60470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YakPN-0005Qc-2I for Help-gnu-emacs@gnu.org; Wed, 25 Mar 2015 08:27:41 -0400 Original-Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 58BAC18987B8 for ; Wed, 25 Mar 2015 05:27:25 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: iOS iPhone or iPad X-Received-From: 162.253.133.43 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:103309 Archived-At: I have text like this: some description here Status1 some other description Status2 some other interesting description Status1 I am using regex like this: \(.*\)\([a-zA-Z]+\)$ with replacement text: \1 ZZZ \2 And what I expected was: some description here ZZZ Status some other description ZZZ Fault some other interesting description ZZZ Status But instead I got: some description here Statu ZZZ s some other description Faul ZZZ t some other interesting description Statu ZZZ s I want my expected outcome, how do I do that? What was wrong with my regex? -- View this message in context: http://emacs.1067599.n5.nabble.com/regex-a-zA-Z-not-working-as-expected-tp353090.html Sent from the Emacs - Help mailing list archive at Nabble.com.