1
我希望下面的正則表達式可以匹配字符串「a34cvDrerevbf98f04389」,字符和數字至少出現一次
\b[0-9a-zA-Z]{21}\b
然而,我發現正則表達式也可以匹配下列字符串,
000001111122222333334
#The string doesn't include a character.
AbstractAlgebraTheory
#The string doesn't include a digit.
它是否有辦法確保字符和數字在字符串中至少出現一次?