Regular expressions (REGEX)
I'm trying to make a regular expression for 2 kinds of situation (on with link on the other without):
The regular expression that I have is:
1: <td class="nfo">microSD, up to 32GB, <a href=http://a.gsmarena.com/adclick.php?bannerid=137&zoneid=9&source=&dest=http%3A%2F%2Fgsmarena.pgpartner.com%2Fsearch_attrib.php%2Fpage_id%3D152%2Fpopup1%5B%5D%3D75%3A105 target=_blank>buy memory</a></td></tr>
2: <td class="nfo">microSD, up to 16GB</td></tr>
When the expression is used in the 1st piece of code the result i got (applying p_spec.matcher("")) is: "microSD, up to 32GB".
p_spec = Pattern.compile("<td[\\s]class=\"nfo\">(.+?)(,\\s)(?i)<a([^>]+)>(.+?)</a></td>");
When I use the expression in the 2nd piece of code I don't get any result at all.
How can I change the regular expression in order to get info from the 1st and the 2nd lines?
Re: Regular expressions (REGEX)
Look at this. http://www.java-forums.org/advanced-...table-tag.html
I think you can figure out it yourself.