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
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.