Oracle PL-SQL "Regular expression" to replace each "(space)and(space)" with ',' in a string I have a string like this x=y and g=h and u=1 and I need to replace each (space)and(space) with ,. I'm using the powerful regular_expression for this but it does not give me the desired result.

select regexp_replace('x=y and g=h and u=1','(^[[:space:]]*)AND(^[[:space:]]*)', ',')
from dual;


I was wondering if you could help me out here. thanks in advance.
select regexp_replace('x=y and g=h and u=1','([[:space:]]*)and([[:space:]]*)', ',')
from dual;

REGEXP_REPL
-----------
x=y,g=h,u=1