I want to eliminate some text pattern from a string, my string has a pipe delimiter, and the parameters do not always follow each other.
This is my string
TType=SEND|Status=OK|URL=min://j?_a=3&ver=1.1|day=3
I want to eliminate TType=SEND and URL=min://j?_a=3&ver=1.1
Therefore my final result should be
Status=OK|day=3
What i have tried. Not working in postgresql .
select REGEXP_REPLACE('TType=SEND|Status=OK|URL=min://j?_a=3&ver=1.1|day=3',
'(TType=.*?(\||$))|(URL=.*?(\||$))', '')