Hi,
May i ask if someone share some command for extracting a string between 2 ref string in a txt file
My objective: i had a file with multiple lines and wants only to extract the string "watch?v=IbkAXOmEHpY" or "watch?v=<11 random character>", when i used "grep 'watch?=*' i got a results per line
<unneeded char>href="/watch?v=IbkAXOmEHpY&feature=plcp<unneeded char>
, and used cut for finally.
What i would like is not having using grep and cut instead sed or similar built in command for extracting directly the "watch?v=IbkAXOmEHpY" without using grep first.
Maybe sed the first ref would be <href="> and end ref <&>
Im searching now and found some sed and perl but no luck at all..
Hope someone can share time..
Thanks in advance