Search:

Type: Posts; User: o2a1

Search: Search took 0.19 seconds.

  1. Replies
    4
    Views
    565

    Re: need help with regex

    ahh thank you,, got it,,
    (!s.matches("[a-zA-Z]+") did the trick,,

    hope i can get the next part done :D
  2. Replies
    4
    Views
    565

    Re: need help with regex

    my bad for crossposting,, but i didnt think i would get a reply, wont happen again,
    ok so i put

    if (s.matches("[a-zA-Z]"))
    {
    output.print("The string must consist of letters!");
    }

    but...
  3. Replies
    4
    Views
    565

    need help with regex

    my program has to output and evaluate a string,

    heres 3 examples of how it is supposed to run,

    eg.1 (no string entered)
    java Word
    Usage: java Word <string>

    eg.2(string containing...
Results 1 to 3 of 3