LoginSignup
0
0

More than 3 years have passed since last update.

フォーム正規表現メモ

Last updated at Posted at 2018-07-27

ひらがな

[ぁ-ゞ]

漢字

[一-龠]

半角カタカナ

[。-゚]

全角カタカナ(ーと全角スペースを含む)

[ァ-ヶー ]

半角記号(半角スペースを含む)

[ -\/:-@\[-`\{-\~]

半角

[a-zA-Z0-9。-゚ -\/:-@\[-`\{-\~]

半角英数記号を含む(肯定先読み)

^(?=.*?[A-Za-z])(?=.*?[0-9])(?=.*?[ -\/:-@\[-`\{-\~])

stringで始まらない(否定先読み)

^(?!string).*$

stringを含まない(否定先読み)

^(?!.*string).*$

.stringで終わらない(否定戻り読み)

^.*(?<!\.string)$

メールアドレス

^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0