I have string like this:
1668955,,, bunch of text</figcaption><br /><a href="https://the_url/article_detail.php?article_id=10003414" target="_blank">w..... </a><br /><h2> text ....<br /><br /><a href="https://the_url/article_detail.php?article_id=10002526" target="_blank">...... text .....
Is there a way to delete everything from ,,, to the end of the line except urls, so the result is:
1668955,,, https://the_url/article_detail.php?article_id=10003414 https://the_url/article_detail.php?article_id=10002526
tidy | xmllint -xpath
orpup
or evenawk
). You can even call 'em from Vim with bang filtering (:h :!
). You'll find tons of helpful info by googling, for example, "command line html parsing".