How can we use sed to get the 4 characters between "Install ID:
" and first space after XKCD
, basically I want to extract "XKCD
" string out of it
Install ID: XKCD (8426200,8179503)
I tried using -
echo "Install ID: XKCD (8426200,8179503)" | sed -n 's/^.*ID:\(.*\)*$/\1/p'
but that gives me "XKCD (8426200,8179503)
" instead of just XKCD
. I am not able to figure out, how to hand the space part.