Oracle 10G Regular Expressions (PL/SQL)

Oracle 10G Regular Expressions (PL/SQL)

 

  

Bob,
Yes, Oracle 10G regular expressions can be used in PL/SQL (see example below).

--REGEXP_LIKE IN PL/SQL (List all rows in a column that has a digit in it)
set serveroutput on
declare
cursor test2_cur is
select * from test2;
begin
for test2_rcd in test2_cur loop
if regexp_like(test2_rcd.text1,'[0:1:2:3:4:5:6:7:8:9]') then
dbms_output.put_line(test2_rcd.text1);
end if;
end loop;
end;
/


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html

Oracle LazyDBA home page