Regular expression to accept only characters (a-z) in a textbox

后端 未结 8 1445
北荒
北荒 2021-01-05 12:16

What is a regular expression that accepts only characters ranging from a to z?

8条回答
  •  情深已故
    2021-01-05 13:00

    The pattern itself would be [a-z] for single character and ^[a-z]+$ for entire line. If you want to allow uppercase as well, make it [a-zA-Z] or ^[a-zA-Z]+$

提交回复
热议问题