I have a file like this
KN1234.1
KN2345.1
KN1233.1
I want to replace the . with v so that I can get output as
KN1234v1
KN2345v1
KN1233v1
After the . it is always 1 but after KN I can also have upto 5 digits. Something like this is also possible KN14345.1
and it's output should be KN14345v1
I tried sed command
sed 's/KN\d+.1/KN\d+v1/g' file.txt
but nothing happened. How can i fix this?
Perl solution would also be appreciated.
Thanks
Thanks for pointing out
– user3138373 Oct 04 '16 at 18:41sed 's/\./v/' file.txt
– Satō Katsura Oct 04 '16 at 19:39