Hi all.

What im trying to accomplish is to get strings from within a string.
These strings are seperated with "//*//"

an example would be

String ExampleString = ("////helle////goodbye////1965////this is an example//*//the end");

then I would like to seperated into seperate strings.

hello
goodbye
1964
this is an example
the end

Any help in order to accomplish this would be greatly appreciated.

Recommended Answers

All 4 Replies

all you need is a call to the split method of the String class. it's pretty self-explanatory.

use Spring StringUtils.delimitedStringtoArray. Maybe I don't remember function name but I am sure Spring StringUtils class has function that you needed. :)

hainguyen81: why converting an application/service into a Spring application/service, for something that can be done with a single method call from the core api's?
to me, this question looks like a homework task, or something in the early stage of learning Java.

working with Spring for this sounds like dropping a 45 megaton nuclear warhead on your house because a mosquito is keeping you awake.

thx guys

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.