回复 9# auto
一次匹配搞不定, 当然这并非必须,只是我比较郁闷~#include <Array.au3>
Local $Str = '"""",AAAA,123456,",",12345678901234567890,0.123456,dddddddddddd,,",,"'
MsgBox(0, '原字符串', $Str)
Local $Test = StringRegExp($str & ',', '\h*([^' & "'" & '"]*?|(?:"[^"]*")*)\h*,', 3)
If @Error Then Exit
For $i = 0 To UBound($Test) - 1
If StringRegExp($Test[$i], '^".+?"$') Then $Test[$i] = StringRegExpRePlace($Test[$i], '^"|"$', '')
If StringInStr($Test[$i], '""') Then $Test[$i] = StringReplace($Test[$i], '""', '"')
Next
_ArrayDisplay($Test, UBound($Test))
|