Why it is showing false when i insert 3 or more than 3 characters after s? :     import java.util.regex.*;
    import java.util.*;
    
    class RegexEx
    {
    	public static void main(String[] args)
    	{
    		String name=new String();
    		Scanner s=new Scanner(System.in);
    		System.out.print("\n\nEnter Name : ");
    		name=s.next();
    		System.out.println(Pattern.matches("[s][a-zA-Z]",name));
    		if(Pattern.matches("[s][a-zA-Z]",name))
    		{
    			System.out.println("\nValid Name");
    		}
    		else
    		{
    			System.out.println("\nInValid Name");
    		}
    	}
    }

cmd:


C:\Users\student\Desktop>javac RegexEx.java

C:\Users\student\Desktop>java RegexEx


Enter Name : s
false

InValid Name

C:\Users\student\Desktop>java RegexEx


Enter Name : sa
true

Valid Name

C:\Users\student\Desktop>java RegexEx


Enter Name : sam
false

InValid Name

C:\Users\student\Desktop>