Results 1 to 2 of 2
  1. #1
    lockmac is offline Member
    Join Date
    Aug 2007
    Posts
    8
    Rep Power
    0

    Default validating a string for numbers and letters?

    Hi. I need to validate a string. My string is 7 characters long (which i have made validation for) but i need my string to validate so that the first 3 characters are letters and the next 4 characters are numbers..

    any ideas how to do this? ive been told to use substring but i dont know how to use this to check if they are numbers or whether they are letters.

    many thanks

  2. #2
    vata2999 is offline Member
    Join Date
    Jul 2007
    Posts
    8
    Rep Power
    0

    Default

    I think you need Regular Expression but i don't know how use regular Expression in java See below link
    [link]
    Regular Expressions and the Java Programming Language
    [/link]

Similar Threads

  1. Validating email address!
    By rameshraj in forum Advanced Java
    Replies: 1
    Last Post: 02-18-2008, 09:39 AM
  2. text Strings to produce letters
    By dc2acgsr99 in forum New To Java
    Replies: 7
    Last Post: 01-29-2008, 08:08 PM
  3. need block letters??
    By dc2acgsr99 in forum New To Java
    Replies: 16
    Last Post: 01-29-2008, 08:31 AM
  4. adjacent repeating letters
    By artemis_r2 in forum New To Java
    Replies: 1
    Last Post: 11-17-2007, 04:48 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
  •