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.
javascriptを使用して、文字列に特殊文字のみが含まれているかどうかを確認することはできますか?
a-zここで,A-Zまたはとして定義されているクラスに含まれない文字のみが文字列に含まれる場合に一致します0-9。
a-z
A-Z
0-9
var regex = /^[^a-zA-Z0-9]+$/
試して...
console.log( "My string to test".match(regex) ) console.log( "My string, to test!".match(regex) )
私のxmlファイルは、w3c標準に従って明らかに正しいです。ただし、それらをシステム(私のものではない)に送信すると、エラーが発生します。http://www.xmlvalidation.com/サイトでそれらを検証しようとしたところ、次の