oracle 正則表達式語法 - Perl

Oracle 從10g起就支持正則表達式了,開始時僅僅是 POSIX 的語法格式,後續的版本對部分 PERL格式的也支持了,這部分表達式包括:

 

OperatorDescription

/d

A digit character.

/D

A nondigit character.

/w

A word character.

/W

A nonword character.

/s

A whitespace character.

/S

A non-whitespace character.

/A

Matches only at the beginning of a string, or before a newline character at the end of a string.

/Z

Matches only at the end of a string.

*?

Matches the preceding pattern element 0 or more times (nongreedy).

+?

Matches the preceding pattern element 1 or more times (nongreedy).

??

Matches the preceding pattern element 0 or 1 time (nongreedy).

{n}?

Matches the preceding pattern element exactly n times (nongreedy).

{n,}?

Matches the preceding pattern element at least n times (nongreedy).

{n,m}?

Matches the preceding pattern element at least n but not more than m times (nongreedy).

 

以上可參考原文: http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/ap_posix003.htm#CHDIHFJA

發佈了143 篇原創文章 · 獲贊 0 · 訪問量 22萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章