要用正则也行,而且可以一个For都不用$Str = _
'[VOD]' & @CRLF & _
'VOD|MOV1: MP3=2 GB D:\文件' & @CRLF & _
'VOD|MOV2: RM=512 MB D:\文件' & @CRLF & _
'VOD|MOV3: AVI=1 GB D:\文件' & @CRLF & _
'VOD|MOV4: MKV=256 MB D:\文件' & @CRLF & _
'' & @CRLF & _
'Disk|Disk Drive1=982 GB (C;D)' & @CRLF & _
'Disk|Disk Drive2=238 GB (E;F)' & @CRLF & _
'' & @CRLF & _
'Partition1=C: (NTFS) 29996 MB free 10168 MB' & @CRLF & _
'Partition2=D: (NTFS) 948992 MB free 248108 MB' & @CRLF & _
'Partition3=E: (NTFS) 199987 MB free 48776 MB' & @CRLF & _
'Partition4=F: (NTFS) 37869 MB free 19953 MB' & @CRLF
$str0 = StringRegExpReplace($str, '(?s).+?MOV.\:\h(.+?\h\w+)\h.+?|.+$', '$1;')
Msgbox(0, 'MOV', 'MOV=' & StringTrimRight($str0, 1))
$str1 = StringRegExpReplace($str, '(?s).+?Drive\d\=(\d+\h\w+).+?|.+$', '$1;')
Msgbox(0, 'Disk', 'Disk=' & StringTrimRight($str1, 1))
$str2 = StringRegExpReplace($str, '(?s).+?free\h(\d+\hMB).+?|.+$', '$1;')
Msgbox(0, 'Partition', 'Partition=' & StringTrimRight($str2, 1))
|