Posted by: iamipew | กุมภาพันธ์ 4, 2008

Regular Expressions With Oracle Database 10g

Regular Expressions With Oracle Database 10g
http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/rischert_regexp_pt1.html
http://www.adp-gmbh.ch/ora/sql/re/index.html
http://www.adp-gmbh.ch/ora/sql/re/regexp_replace.html
http://www.orafusion.com/oracf_sql.htm

Exp.
select  original ,regexp_replace(original,'[[:digit:]]’, ‘0’) as NEW_REG_EXP
FROM TBL_XXX
———————————————————————————-
original                                               ||            new_reg_exp
———————————————————————————-
*999*0269925536683*1234#          ||            *000*0000000000000*0000#
———————————————————————————-

**
original             *999*0269925536683*1234#
‘[^[:digit:]]’ —->099900269925536683012340
‘[[:digit:]]’   —->*000*0000000000000*0000#


ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out / เปลี่ยนแปลง )

Connecting to %s

หมวดหมู่

%d bloggers like this: