René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback
 

owa_pattern

owa_pattern is a package that allows to do regular expressions with Oracle. With 10g, regular expressions will be built into SQL itself.
declare
  
  L_source varchar2(200);
  L_count  number;

begin

  L_source := '<html><body><b>test</b><a href="http://www.test.com">something</a></body></html>';

  L_count := OWA_PATTERN.CHANGE(L_source, '<[^>]+>','','gi');
  L_count := OWA_PATTERN.CHANGE(L_source, '\&[^;]+;', '', 'gi');

  dbms_output.put_line(L_source);
end;
/