aspose file tools*
The moose likes JSP and the fly likes plz hlp me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "plz hlp me" Watch "plz hlp me" New topic
Author

plz hlp me

prasad
Greenhorn

Joined: Dec 19, 2005
Posts: 2
On click of OK, run a check to make sure the string only contains Alphabets and numbers, and format the string according.

For example In the text filed, the input string is, �Hello%Wor;ld�,Piano!!! � Hi5 &*^%# �

You must split the string into tokens with with the following results
�Hello%Wor;ld�
�,Piano!!!�
� Hi5 &*^%# �


The next step will be to remove all special characters and extra blank spaces in the tokens to become :
�HelloWorld�
�Piano�
�Hi5�

formatted string* : Show as �HelloWorld�, �Piano�, �Hi5�


How can solve thesw types of things.plz give me code
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You should have a look at the API for the String class.
There are methods like indexOf, split, replace, replaceAll, etc...


[My Blog]
All roads lead to JavaRanch
Sujith Kanaparthi
Ranch Hand

Joined: Sep 04, 2005
Posts: 45
Hi mmm mm,

I hope you can use java script to do this validation.You can make use event.keyCode of java script to sort out your problem

Regards,
Sujith
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"mmm mm",

This is now your third and final warning to correct your display name. Just for the record: Your initial name was "Null Pointer", this is fictitious and not allowed. You changed it to "Shin Kon". THis name appears to be valid. For reasons unknown you changed it to "mmm mm", this is fictitious and not allowed. Bear has already ask you to change your name here.

We require display names to be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please correct your display name immediately or your account will be closed

thanks for your co-operation,
Dave.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Satou kurinosuke:
You should have a look at the API for the String class.
There are methods like indexOf, split, replace, replaceAll, etc...


In addition to this. You must check out Regular Expressions.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

mmm mm,
Is this a homework assignment?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Originally posted by Ben Souther:
mmm mm,
Is this a homework assignment?


And is the deadline is just at your door step? because you really dont have enough time to register yourself with a real name.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

prasad,
Thank you for changing your name.
Unfortunately, it still doesn't conform to our naming policy which states that you must have a first and last name.
Would you please go back and add your last name?

Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: plz hlp me