本帖最后由 lixiaolong 于 2012-4-28 15:29 编辑
楼主的问题真让人难懂...
Local $Str = _
'8.30,8.31,8.23,8.32,8.21' & @CRLF & _
'7.31,0,6.73,6.72,9.31' & @CRLF
MsgBox(0, '原字符串', $Str)
Local $Test = StringRegExp($str, '[\d\.,]+[\r\n]+.*?,([^,]+)', 1)
MsgBox(0, '', $Test[0])
Local $Str = _
'8.30,8.31,8.23,8.32,8.21' & @CRLF & _
'7.31,0,6.73,6.72,9.31' & @CRLF
MsgBox(0, '原字符串', $Str)
Local $Test = StringRegExpReplace($Str, '(.+\r\n[\d\.,]+,)(\d+),', '\1')
MsgBox(0, '', $Test)
;Local $Test = StringRegExpReplace($str, '(.+\r\n[\d\.,]+,)(\d+)(,)', '\1\3')
;MsgBox(0, '', $Test)
|