#include <File.au3>
#include <Array.au3>


Local $aRecords
If Not _FileReadToArray("E:\server.ini", $aRecords) Then
    MsgBox(4096, "错误", " Error reading log to Array     error:" & @error)
    Exit
EndIf
_ArrayDisplay($aRecords)
For $x = 1 To $aRecords[0]
    ;MsgBox(4096, 'Record:' & $x, $aRecords[$x])
	
	Local $result = StringInStr($aRecords[$x], "VERSION")
	;找到了要比较的内容
	If $result > 0 Then
		;MsgBox(0,"","1.,找到")
		;匹配内容,再替换数组内容
		Local $sOutput = StringRegExpReplace($aRecords[$x], "VERSION", "****.")
		$aRecords[$x] = $sOutput
	EndIf
Next
_FileWriteFromArray("E:\server.ini", $aRecords, 1)

 

相关文章:

  • 2022-03-06
  • 2022-12-23
  • 2021-07-09
  • 2021-08-16
  • 2021-11-15
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2021-12-25
  • 2021-12-01
  • 2022-12-23
  • 2021-08-02
  • 2021-11-15
相关资源
相似解决方案