How do I select all instances of an tag using a regular expression
Problem: My goal is to, given any HTML text as input to my Bash script, the output will be an array of all the links. For example, given this input: ... <div> <span></span> <span>launching on <strong>Nov 25</strong></span> </div> <a ...> <figure class="item-view-box relative"> <div ...> <div ...></div> ... </div> </a> <div ...> <a ...> <figure class="item-view-box relative"> <div ...> <div ...></div> ... </div> </a> </div> <div> <span></span> <span>launching on <strong>Nov 25</strong></span> </div> ... The output should be an array as follows: ["<a ...> ... </a>", "<a (different one right afte
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.