sed substitute whitespace for dash only between specific character patterns
问题 I have a lines like these: ORIGINAL sometext1 sometext2 word:A12 B34 C56 sometext3 sometext4 sometext5 sometext6 word:A123 B45 C67 sometext7 sometext8 sometext9 sometext10 anotherword:(someword1 someword2 someword3) sometext11 sometext12 EDITED asdjfkklj lkdsjfic kdiw:A12 B34 C56 lksjdfioe sldkjflkjd lknal niewoc kdiw:A123 B45 C678 oknes lkwid cnqule nkdal anotherword:(kdlklks inlqok mncvmnx) unqieo lksdnf Desired output: asdjfkklj lkdsjfic kdiw:A12-B34-C56 lksjdfioe sldkjflkjd lknal niewoc