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 3 years have passed since last update.

【正規表現】自分備忘録

Last updated at Posted at 2020-02-05

AまたはBに当てはまる文字を削除し、キュッとさせる(上詰めする)。

```正規表現:置換前 ^(!?.**(A|B)).*$\r\n ```
置換後
(Blank)

AまたはBに当てはまる文字 -以外- を削除し、キュッとさせる(上詰めする)。

```正規表現:置換前 ^(?!.**(A|B)).*$\r\n ```
置換後
(Blank)

'(Single Quotation)を見つけて''(SQ*2)のようにエスケープしたいときに使う。

```正規表現:置換前 ([^,'(])'([^,')]) ```
置換後
$1''$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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?