I try to use PHP to parse a string to extract info, part of the content looks like this
<div>All Versions:</div>
<div class='rating' role='img' tabindex='-1' aria-label='5 stars, 193984 Ratings'><div>
What's the easiest way in PHP to get these two numbers?
(1) the number of stars - which is 5
(2) ratings - which is 193984
P.S. Please don't consider it as HTML parsing but a string