0

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.

3
Contributors
4
Replies
13
Views
3 Years
Discussion Span
Last Post by scheppy
Featured Replies
  • 1

    all you need is a call to the [split method](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String)) of the String class. it's pretty self-explanatory. Read More

0

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

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.