I have an html that contains this markup.
<font class="count">Total count is: 20</font>
How do I use preg_match to get the total count line, which is 20 in this case.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is simple:
Otherwise use a DOM method if you want to find the
<font>tag within other HTML to extract the text portion of the font node and then grab the number at end of the node value.Here is another way just for fun:
And another: