How to assign value to variable with regex (bash)?
I believe you want to use string replacement like this:
Or something like that ... Of course, always the battle escapes the backslash!
A more obvious example:
find "replace all matches" on this page:
source to share