0

I'm trying to split a string that's delimited by "space-quote-space" ( ' ) between the values.

The regex is run in an Oracle PL/SQL select statement, but I believe it's pretty good with the regex it allows

The strings look like this:

FINA 233ff ' BLA 33333333 ' FRED ' O'GLADSON ' 99 LEFT RD ' FLINDERS MI ' 9999 ' 0499999999 ' HERE ARE SOME NOTES $9999.00 OLD THING SD2232DD (LEFT) PLS SEE JOHN

While I can split the string based on the single quote easy enough -

[^']+

...it hits the quote in the middle of the surname (O'GLADSON). To make it easier I can add in a single quote on the start or the end. I can also trim the results afterward, if I can get the split right. What's the correct regex?

MT0
  • 143,790
  • 11
  • 59
  • 117
Wayne G
  • 11
  • 1

1 Answers1

0

I think this is what you need :

([:space:]''[:space:])   //single quote need to be escaped
Carr
  • 2,691
  • 1
  • 19
  • 27