I have a string like first url, second url, third url and would like to extract only the url after the word second in the OS X Terminal (only the first occurrence). How can I do it?
In my favorite editor I used the regex /second (url)/ and used $1 to extract it, I just don’t know how to do it in the Terminal.
Keep in mind that url is an actual url, I’ll be using one of these expressions to match it: Regex to match URL
Edit: I misunderstood. Better:
or: