I need to replace value with new_value in strings
key:value
key: value
key: value
To get
key:new_value
key: new_value
key: new_value
Number of spaces after : is arbitrary. The regex to match would be key: *value.
How do I replace value with new_value in such strings preserving number of spaces with sed?
To clarify, key1:value or key:value1 do not match due to different key/value, so such strings are not altered.