This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes String Tokenizer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

String Tokenizer

armo
Greenhorn

Joined: Oct 26, 2004
Posts: 3
Hello,

I am trying to tokenize a String that contains HTML tags. Can anyone help me with that?

Any hints will be appreciated.
Thanks.
Dun Dagda
Ranch Hand

Joined: Oct 12, 2004
Posts: 54
To tokenize your string, you might try the split(...) method of the String class. It takes a regular expression as its argument, so you might want to look up the java documentation on regular expressions. A helpful link that I found is this regex recipes pdf file.

There is also a StringTokenizer class, but its use in code is no longer recommended by Sun.

DD


SCJP 1.4<br />SCWCD (in progress)
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Compscience Compscience,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Round these parts, posting the same question in multiple forums is bad practice. It can make it rather difficult to follow a conversation, plus folks spend time saying things that were just said.

Please continue this conversation in the duplicate thread. I'm closing this thread.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: String Tokenizer
 
Similar Threads
How to convert byte array into string array?
date format with MS Access database
Tech Word Game
WA #1.....word association
ResultSet to Array