Greetings
I have a line of text with multiple web links in the line. I'd like to replace the actual links with the text "<web-link>" so I don't accidently hit them while reading on my iphone. I've tried many versions of the following sed command, sed 's/(http.*)/<web_link>/g', but it simply replaces everything between the first instance of "(http" and the last instance of ")" with <web_link>, or does nothing at all.
ex.)
This line has a link to a web page (
http://www.webpage.com/file.html ) then some more text (extra text) and then another link (
http://www.nextwebpage.com.index.html ) to a website.
$ echo "This line has a link to a web page (
http://www.webpage.com/file.html ) then some more text (extra text) and then another link (
http://www.nextwebpage.com.index.html ) to a website." | sed 's/(http.*)/<web_link>/g'
what I get is:
This line has a link to a web page <web_link> to a website.
what I'd like is:
This line has a link to a web page <web_link> then some more text (extra text) and then another link <web_link> to a website.
What am I doing wrong with my sed command?