Regular expressions help!
I'm trying to pull a seven digit number out of a string of text. I only need the number but the text before and after it will change every time. I'm reading the html in line by line but need to only get the second 7 digit number from this string
</td><td align="left" width="15%" class="text"><a CLASS="Bcruising" HREF="
 javascript:EditMember(2566802,2966456)
 ">Usernamexxx</a>I would use this command in bash "egrep -o '[0-9]{7}' " and am looking for something similar in java.
Any help would be very appreciated :)
Posted Jul 12, 2012, 6:24 PM UTC
42
Did you try using the Pattern and Matcher classes from Java? Something like:
Thank you. It worked like a charm.