Believe that this problem has been resolved ... for more details see the note Edit 2.
This is a fairly simple regex problem (I thought) that I suspect that someone more experienced in them can probably solve it quite easily.
I have the following expression:
(?<token>((?<!(\.\d*))'[^']*'(?=[ ,])|(?<!(\.\d*|'))[-+]?\d*\.?\d+(?!(\.|'))))
The following is a test line:
34, 12., 'test', 106, 53, 'noon' ,'lunch' ,0.5,6, 8, .87 ,'foo', 'bar', 1253 ,'baz'.3, 1.2.3, .3'foo', 124`, 12.
The purpose of the regular expression is really simple - to parse a list of strings consisting of elements that are either strings enclosed in single quotes or numbers. Neither the line type, nor the prefix or suffix is different. A comma or space is a sufficient separator between tokens. More formally, we can say:
<token-string> :== <token-string>,<token> | <token>
<token> :== <quoted-string> | <number>
<quoted-string>:== 'a-zA-Z0-9'
<number> :== (floating point number)
, . 99%, : , (, 12. ) - , , point fail - , , "1" "12.", lookahead.
, , , . , , , , - , . .
, "baz'.3, 1.2.3 .3'foo" . , 34, 106, 53 .., .
2 , . \d () , "12." . , , . :
(?<token>((?<!(\.\d*))'[^']*'(?=[ ,])|(?<!(\.\d*|'))[-+]?\d*\.?\d+(?!(\.\d|'))))