Find what: [ ]+’ Replace with: ‘ Search Mode: Regular expression It means: Replace all repeating space characters adjacent to single quote by single quote. [ ]+ =collect spaces [ ]+’ =collect spaces adjacent to single quote Similarly you can use ‘[ ]+ to collect spaces following single quote.
Solution using regexp split to table Solution usineg SQL WITH RECURSIVE