I need to split message:
500 Oracle Parkway.Redwood Shores.*.=13
Now I have a bit worked solution for Substr1/2/4
SELECT '500 Oracle Parkway.Redwood Shores.*.=13' string1,
REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','.[^.]+')
"SUBSTR1" ,
replace(REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','[$.]+
[^.]+'),'.',null) "SUBSTR2" ,
REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','[$.]+.[$.]+[^.]')
"SUBSTR3" ,
REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','[^=]+$')
"SUBSTR4"
FROM DUAL;
However Substr3 contains '='. I'd like to have at least '.*.' or ' * '
Could you please give me a hint how to "exclude" any characters (e.g. '=') in regexp?
Any help is much appreciated!
Thank you
Resolved see SUBSTR3.1
SELECT
'500 Oracle Parkway.Redwood Shores.*.=13' string1,
REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','.[^.]+')
"SUBSTR1" ,
replace(REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','[$.]+
[^.]+'),'.',null) "SUBSTR2" ,
REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','[$.]+.[$.]+
[^.]') "SUBSTR3" ,
REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','[^.]+',1,3)
"SUBSTR3.1" ,
REGEXP_SUBSTR('500 Oracle Parkway.Redwood Shores.*.=13','[^=]+$')
"SUBSTR4"
FROM DUAL;
=(or any character following.*.) with the final part of the pattern,[^.]. So just removing that would give you a quick fix. But it would be helpful to explain more about what you're trying to do, and give more example source strings and the output you're trying to achieve for all of them.substr2is null in your example. Are you really trying to tokenize the string, and them (maybe) remove the=from the final token?