I'm trying to get a Java regular expression to work to try and validate a user input using the `Scanner` `System.in` function. What I am trying to validate is a user input that can only contain letters as input, and can contain more than one word. If I type in for example ("Test1") It will throw up a message, warning that I must enter only letters, and prompt to enter it in again, however if I was to type in ("Test 1"), then it would pass through my regex, it seems to be that the space is causing this problem, but adding a space in my regex has not solved my problem. Any help would be greatly appreciated. Below is the section of my code that is having the issues: 

```
System.out.println("Please enter the your name: ");

while(!input.hasNext("[a-zA-Z]+")){

    System.out.println("Your name must consist of only letters");
    input.nextLine();

}

String name = input.nextLine();

```

This may be clearly wrong to someone, but I am new to Java and regex and have been trying to find out all day whats been going wrong with no success. 

Thank you for your time.