Advertisement

05.21.2008 at 09:11PM PDT, ID: 23423243
[x]
Attachment Details

Regular Expression in Java

Asked by mawingho in Java Programming Language

I have a HTML source code like this
<table border='0' width='70%'>
<tr bgcolor='#b4b4b4'>
   <td width='8%' align='center'>0049</td>
   <td width='20%' align='center'>0019A621C042</td>
   <td width='20%' align='center'>Upstream 0</td>
   <td width='22%' align='center'>10.113.104.246</td>
   <td width='10%' align='center'>-3</td>
   <td width='10%' align='center'>50.5</td>
   <td width='10%' align='center'>36.1</td>
</tr>
</table>

I want to use the matches function in String type to find something.
I have a variable line to store each line in order,
so, first time, the variable line will contains <table border='0' width='70%'>
second time, the variable line will contains <tr bgcolor='#b4b4b4'> and so on.

For each time, I want to use the line.matches() function to find whether a particular line contains any td tags.

anyone can tellStart Free Trial
[+][-]05.21.2008 at 10:15PM PDT, ID: 21621064

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 10:21PM PDT, ID: 21621091

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 10:24PM PDT, ID: 21621102

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 10:30PM PDT, ID: 21621126

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Sign Up Now!
Solution Provided By: humanonomics
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.22.2008 at 02:17AM PDT, ID: 21621994

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628