Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
簡単な質問でしたらすみません。String 内の 4 つの連続する文字が数字であるかどうか (たとえば、1 年) を検証する正規表現はありますか?
たとえば、glorer1891kl -> true、74djada -> false
文字列に4つの連続した文字が存在するかどうかを検証する必要があり、各文字は数字です。
[0-9]{4}
やります。これをテストするための素晴らしいウェブサイトがあります....
http://gskinner.com/RegExr/