all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* regex: \(.*\)\([a-zA-Z]+\)$ - not working as expected
@ 2015-03-25 12:27 AngusC
  2015-03-25 12:50 ` K.P. Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: AngusC @ 2015-03-25 12:27 UTC (permalink / raw)
  To: Help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-25 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2738.1427286469.31049.help-gnu-emacs@gnu.org>
2015-03-25 12:43 ` regex: \(.*\)\([a-zA-Z]+\)$ - not working as expected Loris Bennett
2015-03-25 12:45   ` Loris Bennett
2015-03-25 12:27 AngusC
2015-03-25 12:50 ` K.P. Huang
2015-03-25 12:54 ` Yuri Khan
2015-03-25 14:16   ` AngusC
2015-03-25 12:57 ` tomas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.