String format using regular expressions

Input string output format...

SELECT q'<select ab_c "ABC", efg "EFG" from dual>' str FROM DUAL

Output:

STR                                  
-------------------------------------
select ab_c "ABC", efg "EFG" from dual


Required output format using regular expression...


STR                                  
-------------------------------------
select 'ab_c' "ABC", 'efg' "EFG" from dual

Regular expressions have many limitations as tools of analysis, and you specify the rules you want. This expression puts quotation marks around a non-empty string before a quoted string:

SELECT regexp_replace(q'