Results 1 to 7 of 7

Thread: alittle help!!!

  1. #1
    sheckoo is offline Member
    Join Date
    Oct 2008
    Location
    Egypt
    Posts
    26
    Rep Power
    0

    Default alittle help!!!

    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

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    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.

  3. #3
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    396
    Rep Power
    6

    Default

    Ya it is possible when you use Regular expression,

  4. #4
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    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.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    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.

  6. #6
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    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...

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    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.

Similar Threads

  1. hi there got alittle trouble
    By justime8 in forum New To Java
    Replies: 7
    Last Post: 12-24-2008, 12:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •