I have a string that comes in different formats like these:
UserId=1;IP Address=85.154.221.54;Device Type=Chrome57
Device Type=Chrome57;IP Address=85.154.221.54
Device Type=Chrome57
How can I extract the IP Address and return empty string if there is no match ?
I have tried the following, but it return the string itself if there is no match.
select regexp_replace('Error=0;UserId=-1;IP Address=85.154.221.54;Device Type=Chrome57', '.*IP Address=(.+);.*', '\1') from dual;