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 you need is a call to the split method of the String class. it's pretty self-explanatory.

Jump to Post

All 4 Replies

Re: getting strings from string after certain characters. 80 80

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

Re: getting strings from string after certain characters. 80 80

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

Re: getting strings from string after certain characters. 80 80

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.

Re: getting strings from string after certain characters. 80 80

thx guys

Be a part of the DaniWeb community

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