hey people
can any body tell me what is the best way
to check that the input that the user give it to me
is a string without any numbers
and another way if i want to check that this input is consist of numbers like phone number
Printable View
hey people
can any body tell me what is the best way
to check that the input that the user give it to me
is a string without any numbers
and another way if i want to check that this input is consist of numbers like phone number
Validate that any character of the string is a number or not.
What you mean by 'like phone number'? Are you want to match any patter there? If so read more about regular expressions.
Ya it is possible when you use Regular expression,
Eranga and makpandian are right. String has several very useful methods that use regular expressions. They are a pain to learn, but they are very powerful.
I have found a useful utility written in Java called QuickRX. It is primarily an Exclipse plug-in, but I use it in stand-alone mode. It lets you copy in text to search and then executes your regular expression as you build it, giving instant feedback.
Hey Steve, is that link you have post here is correct? It's just directed to the sourceforge home page. I've search that project and didn't find any project with that name. Can you please check that link again.
Eranga-
I just clicked through on the link, and it took me to the SourceForge page for the project. Possibly, SourceForge was having a problem when you tried it. Also, the page says "SourceForge" in big letters and the project name, "QuickRX", in smaller ones on what looks like a tab.
Both the plug-in and the stand-alone version have worked great for me. I like the stand-alone better, because I don't have to deal with having it in a little side panel in Eclipse...
Yep, now I can see that project. Initially it directed to the home page.
Actually I want to try out that stand-alone plugin, since I'm not an Eclipse user. I'm interest on that.