Consider the following table keywords
:
keyword
--------------------------------
(test1 AND ("test2" OR "test 3"))
"test4"
"test 5"
(test 5)
I need to select this table, but in the output there should have happened some clean up, namely:
- if there is a space in a keyword, and the keyword is surrounded by quotes, keep the quotes
- if there is no space in a keyword, and the keyword is surrounded by quotes, remove the quotes
Desired output:
keyword
--------------------------------
(test1 AND (test2 OR "test 3"))
test4
"test 5"
(test 5)
I believe I need a regular expression in my select, but have no experience here. Can you help me out?