[英]How can I make regular expression in python match only alphanumeric and not numerical or alphabet characters?
[英]How can I make regular expression for username that only starts with alphabet?
我正在嘗試創建一個只允許特定用戶名的正則表達式
這就是我正在做的 - ^(?=[a-zA-Z0-9._]{4,10}$)(?..*[_.]{2})[^_.].*[^_.]$
這應該適合你:
^(?=[a-zA-Z0-9._]{4,10})[a-zA-Z](?:[a-zA-Z]+_[a-zA-Z0-9]+|[a-zA-Z]+\.[a-zA-Z0-9]+|[a-zA-Z0-9]+)$
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.