wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes String Tokenizer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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://aspose.com/file-tools
 
subject: String Tokenizer
 
Similar Threads
Tech Word Game
date format with MS Access database
ResultSet to Array
WA #1.....word association
How to convert byte array into string array?