0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

正規表現

0
Posted at

正規表現

何か
→パターンマッチ

何に使うか
→文字列の抽出、検索に利用

例えば
http://www.xxx.jp のxxxの部分を抽出したいなど

VSCodeの「大文字と小文字を区別する」をON、「正規表現を使用する」をON

題材1

,abAB12あい,
,abAB12あい,
小文字のアルファベット

[a-z]

大文字のアルファベット

[A-Z]

アルファベット

[a-zA-Z]

数字

[0-9]

アルファベットと数字

[a-zA-Z0-9]

最初のカンマ

^,

最後のカンマ

,$

題材2

ab	AB	12	あい
タブ

\t

改行

\n

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?