2
這是我目前正則表達式檢查中沒有空格:正則表達式,識別字符串
const validPassword = (password) => password.match(/^(?=.*\d)(?=.\S)(?=.*[a-zA-Z]).{6,}$/);
我有一張支票至少1個字母和1號和至少6個字符長。不過,我也想確保字符串中的任何位置都沒有空格。
找到這個答案在這裏,但由於某種原因,在我的代碼它的傳球。
What is the regular expression for matching that contains no white space in between text?
這是一個很好的解釋。 –
謝謝! Geez Regex總是在我的頭上,幾乎沒有遇到我必須使用它的情況。 –