I'd like to be able to parse a web page and return any element that has a title containing exactly 4 letters.
For example:
<li><a href="test.com/dogs" title="dogs"></a></li>
<li><a href="test.com/cat" title="cat"></a></li>
<li><a href="test.com/horse" title="horse"></a></li>
<li><a href="test.com/eels" title="eels"></a></li>
In this example, I'd like to return an array containing 'dogs' and 'eels' since the title contains exactly 4 characters. How can I go about doing this? Thanks!