LoginSignup
2
1

More than 3 years have passed since last update.

正規表現サンプル

Last updated at Posted at 2017-08-17

①指定された文字列を含んでいない行目を検索する正則表現について、以下のサンプルを参照してください。
例:

abdd
adfad
daerfae
adasampleefe
samplec
dsamplef
sample

下記の例で検索すると、第1,2,3行目を検索できる
^(?>(?:.*?sample)?)^.*$

②始めのスペースを二つスペースに置換する場合、
image

③最後のスペース
(\ )(?!.*\1)


正規表現で文字列を含まない、否定の記述
https://uxmilk.jp/50674

2
1
3

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
1