Between Regular Expressions and XPath, which is the most preferred Language for Data Extraction? I personally am more skilled with RegEx and I think it gives you more ability to extract a specific text if you understand its values correctly.
<asw+=([""]+)?([w+-s""]+)(=""s?http|s?://)+([w./-?=""]+)>(<)?([w+sw+.:,‘’|$?-—]+)?([=""w+-s]+)?(>[ws:,‘’.-/%]+)?(</span>)?</a>
This is just one of the examples of how I wrote a RegEx to extract the Headlines from one of the News Sites (for study purpose), and yes I am aware that I need to learn the skill to shorten the RegEx because it is quite complicated.
Shezad Mistry is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.