Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle regular experssion
Hello, in my query the # are really spaces.
My question is in regexp_replace, is there a way to remove the leading #'s as well.
select regexp_replace('a#b#cde#fghi#j','[a-z]+','',1,1) from dual; select regexp_replace('a#b#cde#fghi#j','[a-z]+','',1,2) from dual;
You can see one of the first query result has a leading #. I am thinking that I have to "select trim(regexp_replace( etc))" Is that right?
Thank you for your help.
Peter G. Dempsey
What I see is below (10.2 on Solaris 10 V210)
SQL> SQL> SQL> select regexp_replace('a#b#cde#fghi#j','[a-z]+','',1,1) fromdual;
REGEXP_REPLAC
SQL>
REGEXP_REPLAC