Hi,
Use the class java.util.StringTokenizer
String s = "your string";
StringTokenizer st = new StringTokenizer(s,";");
String sep = new String();
while(st.hasMoreTokens())
{
sep=st.nextToken();
}
Cheers,
Nikhil
>From: Marcos Lloret <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: managing a string
>Date: Mon, 25 Sep 2000 18:08:28 +0100
>
>hi,
>
> i have a string with some words separated by ;
>
> i would like to, firstly, take the words before the ';' and put them
>in a new string. secondly taking those words between the ';' and keeping
>them into another string. ....
>
> how can i do that?
>
>thanks in advance,
>
>marcos
>[EMAIL PROTECTED]
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html