I’m using the following command with sed : sed s/1[^\.]/2/g test
I want to replace every 1 with a 2 except the one followed by a point. It works fine.
But in my file I’ve got a {{1e}} that is replaced by {{2}}.
Why does sed delete the e?
PS: I’m a beginner with regex so it might be an obvious mistake.
Capture the character after
1and insert it again after2:The only problem is
1at the end of line. You can replace it by2with