Is it possible with sed to replace a line with capture groups from the regex?
I have this regex, please note that this is fixed, I cannot change it.
simple sample(.*)
This is what I want:
This is just a simple sample line with some text
Change to:
line with some text
I need something like this:
sed '/simple sample \(.*\)/c \1'
Which now outputs:
1
Anybody knows if you can use capture groups in sed with the change line function?