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.
Javaで私は単に作る:
boolean match = string.matches("\\d{2}-\\d{2}");
これをjavascriptで作成するにはどうすればよいですか?
JavaScript の場合:
var inputString = '22-34'; var pattern = /\d{2}-\d{2}/; var match = pattern.test(inputString); // match will equal true
MDN 正規表現リファレンス ドキュメント