LoginSignup
2
2

More than 5 years have passed since last update.

正規表現の検索文字列(memo)

Last updated at Posted at 2018-02-26
書き方 意味
A+ 1個以上のA(可能な限り長く)
A* 0個以上のA(可能な限り長く)
A+? 1個以上のA(可能な限り短く)
A*? 0個以上のA(可能な限り短く)
A? 0または1個のA
A{3} 3個のA
A{3,} 3個以上のA
A{3,5} 3~5個のA
A B
ABC DEF
[ABC] A,B,Cのいずれか1文字
[A-C] A~Cのいずれか1文字
[^ABC] A,B,C以外のいずれか1文字
. 任意の1文字
.+ 任意の1以上の文字
^A Aで始まる文字列
A$ Aで終わる文字列
A.+B 『A(任意の文字列)B』(可能な限り長く)
A.+?B 『A(任意の文字列)B』(可能な限り短く)
A[^\/]+B 『A(『/』を含まない文字列)B』


https://crocro.com/write/manga_javascript/wiki.cgi?p=regexp

2
2
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
2
2