Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2005

Tip: Looking for answers? Try searching our database.

Pulling out data between <TD> tags using regular expressions

Thread view: 
tdmailbox@yahoo.com - 26 May 2005 23:05 GMT
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.
Wibble - 27 May 2005 01:26 GMT
<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
[quoted text clipped - 3 lines]
>
> After 3 hours I am giving up and asking the experts.
Chris Uppal - 27 May 2005 10:52 GMT
Wibble top-posted:
> <TD[^>]*>([^<]*)</TD>
>
[quoted text clipped - 3 lines]
> >
> > <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
Wibble - 28 May 2005 00:01 GMT
The specification didnt include nested tags.

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

> Wibble top-posted:
>
[quoted text clipped - 12 lines]
>
>     -- chris


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.