In regular expressions, what is the difference between ^[a-zA-Z]+$
and ^[a-zA-Z]*$
. Also would I be able to not include it at all, either with ^[
^[a-zA-Z]+$
matches any alphabetic string (consisting of the letters a-z, large or small) of size 1 or longer. The ^ and $ characters mean "start" and "end" of the line, so they only match full lines consisting of one "word".
^[a-zA-Z]*S
is similar, only the asterisk (*) means "no or any number of" the preceding character/group. The S is just an S and matches exactly one S. Basically the whole thing matches any string that starts at the beginning of a row, contains any number of letters and ends with an S. Other things can come after the S though, the line does not have to end there since $ was not used.