Hi,

Use the Java equivalent of the C function isdigit() in a while
loop on every character of the string and shuffle char's up
to overwrite the non-digit ones.

Regards

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Vasudev Ram
Infosys Technologies Limited
Pune, India
Email : [EMAIL PROTECTED]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

> -----Original Message-----
> From: Zhou, Bin, BGM [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, January 25, 2000 3:18 AM
> To:   [EMAIL PROTECTED]
> Subject:      Strip non-numeric chars
>
> Hi list,
>
> I am new to Java and Servlet.  I am wondering if someone of you knows an
> easy way to strip all non-numeric characters from a string.  For example
> description - 123 will become 123.
>
> Thanks a lot,
>
> :-) Bin
> Bin Zhou
> *732-420-7418
> *[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

___________________________________________________________________________
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

Reply via email to