I have a file with text in it that looks like this:
ssid="sdfsdf" #psk="sdfsfsdf" psk=zzzs93j03r093ur0fjfs39uj }
I'm learning sed and want to use it to extract just the string that starts with zzz.
I though I could just grab everything between " psk=" and " }" but this does not seem to work:
sed 's_ psk=\(.*\) }_\1_' /tmp/myfile
I am also curious why it doesn't work. psk appears in the text twice but I though searching for " psk" would distinguish it from "#psk"