Discussion:
regexp replace result format
(too old to reply)
v***@at.BioStrategist.dot.dot.com
2012-09-22 12:59:42 UTC
Permalink
I want to change 9,999 to 9999 so I tried query-replace-regexp from
[0-9],[0-9][0-9][0-9] to [0-9][0-9][0-9][0-9] and got a literal replacement.

What do you do to get it to repeat the original?

- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security means private firearms not lazy obstructive guards]
[Urb sprawl confounds terror] [Phooey on GUI: Windows for subprime Bimbos]
v***@at.BioStrategist.dot.dot.com
2012-09-22 13:18:34 UTC
Permalink
Call it "remove thousands separator"

I thought of using "&", no luck



- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security means private firearms not lazy obstructive guards]
[Urb sprawl confounds terror] [Phooey on GUI: Windows for subprime Bimbos]
Barry Margolin
2012-09-22 21:52:53 UTC
Permalink
Post by v***@at.BioStrategist.dot.dot.com
I want to change 9,999 to 9999 so I tried query-replace-regexp from
[0-9],[0-9][0-9][0-9] to [0-9][0-9][0-9][0-9] and got a literal replacement.
What do you do to get it to repeat the original?
Replace:

\([0-9]\),\([0-9][0-9][0-9]\)

With:

\1\2
--
Barry Margolin, ***@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
v***@at.BioStrategist.dot.dot.com
2012-09-26 17:45:51 UTC
Permalink
Thanks so much


- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security means private firearms not lazy obstructive guards]
[Urb sprawl confounds terror] [Phooey on GUI: Windows for subprime Bimbos]
Loading...