[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
regex: \(.*\)\([a-zA-Z]+\)$ - not working as expected
From: |
AngusC |
Subject: |
regex: \(.*\)\([a-zA-Z]+\)$ - not working as expected |
Date: |
Wed, 25 Mar 2015 05:27:08 -0700 (MST) |
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.
- regex: \(.*\)\([a-zA-Z]+\)$ - not working as expected,
AngusC <=