URL reading

I am reading in a URL off a website using

while ((inputLine = in.readLine()) != null )

text += inputLine;

it works fine but i only want a certain section of the text any good suggestions on how to only read what i want or read it all then cut it?

[273 byte] By [mark07a] at [2007-11-27 10:14:45]
# 1

- split: java.lang.String

- StringTockenizer: java.util

- Regular expressions: http://java.sun.com/docs/books/tutorial/essential/regex/index.html

java_2006a at 2007-7-28 15:35:16 > top of Java-index,Java Essentials,Java Programming...
# 2

let's say i have a long line of html code like style='font-size:18.0pt;color:#CC3300'>July 11, 2007</span></i></b>

how could i start read the date July 11, 2007?

mark07a at 2007-7-28 15:35:16 > top of Java-index,Java Essentials,Java Programming...
# 3

> let's say i have a long line of html code like

> style='font-size:18.0pt;color:#CC3300'>July 11,

> 2007</span></i></b>

> how could i start read the date July 11, 2007?

can you use charAt() to find out the index of the 1st [ > ] which is rigth before the july 11, then you can start to read it from there

marco_wua at 2007-7-28 15:35:16 > top of Java-index,Java Essentials,Java Programming...
# 4

use regilar expressions.

create a pattern that matches: >July 11, 2007<

java_2006a at 2007-7-28 15:35:16 > top of Java-index,Java Essentials,Java Programming...
# 5

Regular Expression is definitely the way to go

Brightness86a at 2007-7-28 15:35:16 > top of Java-index,Java Essentials,Java Programming...
# 6

>Regular Expression is definitely the way to go

Right, but the OP was very happy with the charAt method ;O)))

java_2006a at 2007-7-28 15:35:16 > top of Java-index,Java Essentials,Java Programming...