I have a small example, of how to use INSTR()
and SUBSTR()
My example:
String = 'test = "2"';
apostrophe1:= INSTR(String,'"',1,1);
apostrophe2:= INSTR(String,'"',1,2);
equal:= INSTR(String,'=',1,1);
f_property_name:= SUBSTR(V1,1,equal-2);
f_property_value:= SUBSTR(V1,(apostrophe1)+1,(apostrophe2)-2);
dbms_output.put_line(f_property_name||' = '||f_property_value);
I wish to have a result like: test = 3
.
But my result is: test = 3"
Can someone explain where is my mistake?
It is working with this.