Java tutorial
import java.util.Scanner; import java.util.regex.Pattern; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); String userName; System.out.println("Enter your email address: "); userName = scn.findInLine(Pattern.compile("[a-z]+")); System.out.println(userName); } }