本帖最后由 王王 于 2011-8-12 08:19 编辑
各位大侠帮看下 先谢谢了
假如uuss.txt内容为
11111%11125522%2222445
kkkk % kioll % 554d r
fdgfggdg% .;;;;, %645552
kkllklk%kjhhu % 21525
......
.....
....
...
..
.
$Biaot1 = FileReadLine("D:\uuss.txt", 1)
$shuliang1 = StringInStr ( $Biaot1 , "%" , 0 ,1 )
$shuliang2 = StringInStr ( $Biaot1 , "%" , 0 ,2 )
$shuliang3 = StringInStr ( $Biaot1 , "%" , 0 ,3 )
$neirong1 = ($shuliang1)-1
$neirong2 = ($shuliang2)-1
$neirong3 = ($shuliang3)-1
$guanjianzi1 = ($shuliang1)+1
$guanjianzi2 = ($shuliang2)+1
$guanjianzi3 = ($shuliang3)+1
$weishu2 = ($shuliang2)-($guanjianzi1)
$weishu3 = ($shuliang3)-($guanjianzi2)
$result = StringMid ( $Biaot1, 1 , $neirong1
$result2 = StringMid ( $Biaot1, $guanjianzi1 , $weishu2)
$result3 = StringMid ( $Biaot1, $guanjianzi2 , $weishu3)
$kongbai = StringStripWS($result,8)
$kongbai2 = StringStripWS($result2,8)
$kongbai3 = StringStripWS($result3,8)
MsgBox("","1内容",$result)
MsgBox("","2内容",$result2)
MsgBox("","3内容",$result3)
MsgBox("","1除空白内容",$kongbai)
MsgBox("","2除空白内容",$kongbai2)
MsgBox("","3除空白内容",$kongbai3) |