• Post Reply Bookmark Topic Watch Topic
  • New Topic

Get part of html code  RSS feed

 
Vlad Golodov
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do somebody knows how to get specific part of the html code? For example, between </td><td width="30">This text</td></tr>. In php there is a code like eregi("begin with", "end"). All between begin and end code will be captured.

Thanks!
 
Joe Ess
Bartender
Posts: 9443
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The brute force method would be to use String.indexOf() to bracket the section and String.substring() to get the data. This doesn't have much to do with IO, so I'm going to move it to Java In General: Intermediate. It has more traffic, so maybe we'll get more alternatives.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!