Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Pulling out data between <TD> tags using regular expressions

Reply
Thread Tools

Pulling out data between <TD> tags using regular expressions

 
 
tdmailbox@yahoo.com
Guest
Posts: n/a
 
      05-26-2005
If I had this tag and wanted to return 123 how would I do it? I have
tried countless methods but can not get the only the 123 without the
<TD> tags

<TD class=tblform3 id=L_listing width=23>123</TD>

After 3 hours I am giving up and asking the experts.

 
Reply With Quote
 
 
 
 
Wibble
Guest
Posts: n/a
 
      05-27-2005
<TD[^>]*>([^<]*)</TD>

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> If I had this tag and wanted to return 123 how would I do it? I have
> tried countless methods but can not get the only the 123 without the
> <TD> tags
>
> <TD class=tblform3 id=L_listing width=23>123</TD>
>
> After 3 hours I am giving up and asking the experts.
>

 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      05-27-2005
Wibble top-posted:
> <TD[^>]*>([^<]*)</TD>
>
> > If I had this tag and wanted to return 123 how would I do it? I have
> > tried countless methods but can not get the only the 123 without the
> > <TD> tags
> >
> > <TD class=tblform3 id=L_listing width=23>123</TD>



Won't work if the included text has it's own tags.

I doubt whether regexps are the right tool for this job. (Personally, I doubt
whether they are ever the right tool for any job).

-- chris



 
Reply With Quote
 
Wibble
Guest
Posts: n/a
 
      05-27-2005
The specification didnt include nested tags.

Java is full of cool stuff that you have to rewrite if you
actually care.

Chris Uppal wrote:
> Wibble top-posted:
>
>><TD[^>]*>([^<]*)</TD>
>>
>>>If I had this tag and wanted to return 123 how would I do it? I have
>>>tried countless methods but can not get the only the 123 without the
>>><TD> tags
>>>
>>><TD class=tblform3 id=L_listing width=23>123</TD>

>
>
>
> Won't work if the included text has it's own tags.
>
> I doubt whether regexps are the right tool for this job. (Personally, I doubt
> whether they are ever the right tool for any job).
>
> -- chris
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PyQt: Pulling Abstract Item Data from Mime Data using Drag and Drop. Mudcat Python 2 12-14-2008 02:45 AM
replacing tags between tags beartiger@gmail.com Perl Misc 9 09-19-2005 02:32 AM
Pulling out data between <TD> tags using regular expressions tdmailbox@yahoo.com Perl Misc 20 05-27-2005 04:44 AM
C# regular expressions, HTML & removal of text between <script> tags john.w.blair@gmail.com Perl Misc 4 04-12-2005 01:07 AM
Add custom regular expressions to the validation list of available expressions Jay Douglas ASP .Net 0 08-15-2003 10:19 PM



Advertisments