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 1 year has passed since last update.

Db2 : SQLで正規表現(1)正規表現サポートのための関数一覧

Last updated at Posted at 2022-12-13

Db2 LUW(Linux,Unix and Windows版)ではV11.1から正規表現をSQL内で使うことができるようになっており、Oracle互換機能の一環として、Oracleと互換性のある以下の関数が使用できます。

Db2の正規表現サポートのための関数一覧

関数名 機能概要
REGEXP_LIKE 探索結果(マッチの有無)をTRUE (1)またはFALSE(0)で返す
REGEXP_COUNT
(別名: REGEXP_MATCH_COUNT)
第一引数の文字列値に対して第二引数のパターンがマッチした回数を返す
REGEXP_INSTR マッチした箇所の位置(最初にマッチした場所が先頭から何文字目か)を返す
REGEXP_REPLACE マッチ箇所を置換パターンで置換した文字列を返す
REGEXP_SUBSTR
(別名:REGEXP_EXTRACT)
マッチ箇所の文字部分列を返す

参考資料

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?