Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

plz hlp me

 
prasad
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should have a look at the API for the String class.
There are methods like indexOf, split, replace, replaceAll, etc...
 
Sujith Kanaparthi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mmm mm,
Is this a homework assignment?
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic