Local $sSource = _
@CRLF & _
'<?xml version="1.0" encoding="UTF-8"?>' & @CRLF & _
'<!-- Produced by Beyond Compare 4 from Scooter Software -->' & @CRLF & _
'<BCState Version="1" MinVersion="1">' & @CRLF & _
' <TBcState>' & @CRLF & _
' <FirstStartup Value="False"/>' & @CRLF & _
' <FormPositions>' & @CRLF & _
' <TCheckForUpdatesDialog Value="485;227;880;511"/>' & @CRLF & _
' <TDirLoadErrorDialog Value="488;321;878;417"/>' & @CRLF & _
' <TProfileBrowseDialog Value="383;77;982;660"/>' & @CRLF & _
' <TViewFrame Value="0;0;1366;738"/>' & @CRLF & _
' </FormPositions>' & @CRLF & _
' </TBcState>' & @CRLF & _
' <TCheckForUpdatesState>' & @CRLF & _
' <Build Value="25118"/>' & @CRLF & _
' <CheckID Value="256591142818099"/>' & @CRLF & _
' <LastChecked Value="2020-10-30 10:40:18"/>' & @CRLF & _
' </TCheckForUpdatesState>'
;~ MsgBox(0, '源字符串', $sSource)
Local $aSRE = StringRegExp($sSource, '(?mi)^\h*<CheckID Value\="(\d*)"', 1)
If Not @Error Then MsgBox(0, '删除' & $aSRE[0], StringRegExpReplace($sSource, '(?mi)^(\h*<CheckID Value\=")\d*"', '\1"'))
|