i am getting started with regex in java and am trying to extract the number 99999 from a String which looks like:
<result name="response" numFound="99999" start="0">
Can you suggest me what can be the most efficient regex to achieve that? Thanks!
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.
If this is a one-off case, you can use the
PatternandMatcherclasses fromjava.util.regexpackage as follows and extract the value:Otherwise, it is strongly recommended to use a proper HTML Parser like
Jerichoto parse the HTML and read the attributes accordingly.