zaqwsxcde has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I want to replace the separator ".." (two points) by a comma. I have tried with no success the following commands:perl -pe 's/../,/' input.txt >output.txt perl -pe 's/".."/,/' input.txt >output.txt perl -pe 's/'..'/,/' input.txt >output.txt perl -pe 's/t./,/' input.txt >output.txt
Here is an example of the text which I am editing:
1234456..123456 ytrv iuuhygjk 123466..9876
I want it to be changed to this:1234456,123456 ytrv iuuhygjk 123466,9876
Please advice what is wrong with the oneliners above.
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Replace ".." with ","
by choroba (Cardinal) on Apr 05, 2015 at 14:21 UTC | |
Re: Replace ".." with ","
by afoken (Chancellor) on Apr 05, 2015 at 14:22 UTC | |
Re: Replace ".." with ","
by aaron_baugher (Curate) on Apr 05, 2015 at 14:22 UTC | |
Re: Replace ".." with ","
by zaqwsxcde (Initiate) on Apr 05, 2015 at 14:28 UTC |