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.
HTML5のパターン機能を使ってテキストエリアの入力欄から不要な単語を除外したい。
「バイアグラ」や「シアリス」などのテキスト内の単語を除外したい
これをどのようにコーディングできますか?
この正規表現を使用できます:
^((?!viagra)(?!cialis).)*$
投稿で説明されているように:単語を含まない行に一致する正規表現?
あなたはそれを使用することができます
<input type="text" pattern="[^(^viagra$|^cialis$)]">