How can I write a regex that matches only letters?
You can try this regular expression : [^\W\d_] or [a-zA-Z].
[^\W\d_]
[a-zA-Z]