LoginSignup
28
20

More than 5 years have passed since last update.

オンラインで正規表現をテスト

Last updated at Posted at 2016-07-21

https://regex101.com/ で pcre, javascrypt, python の正規表現をテストできる

Screen Shot 2016-07-21 at 10.03.10.png

  1. 正規表現を入力すると右上でその意味を詳細に説明してくれる
  2. テスト文字列を入力すると
    1. 上でマッチしたかどうか
    2. 右中で括弧で抽出された部分文字列を教えてくれる
  3. pcre と python バージョンは regex debugger 機能があり、どのようなステップでマッチしたか教えてくれる Screen Shot 2016-07-21 at 10.38.38.png
  4. javascript バージョンは Unicode 指定を正しく認識してくれた
    1. pcre は \u 指定を受け付けてくれない (Error)
      1. ただ \u200c を全角空白を置換したらマッチした
    2. python は \u200c 指定を受け付けてくれるが、マッチしない
      1. こちらも \u200c を全角空白を置換したらマッチした
28
20
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
28
20