I'm doing the following command in a bash:
echo -e 'UNUSED\nURL: ^/tags/0.0.0/abcd' | sed -rn 's#^URL: \^/tags/([^/]+)/#\1#p'
I think this should output only the matching lines and the content of the capture group. So I'm expecting 0.0.0
as the result. But I'm getting 0.0.0abcd
Why contains the capture group parts from the left and the right side of the /
? What I am doing wrong?