clock874 当前离线
列兵
xczxczxcz (Tα酱油路过)当前离线
中尉
$file="$(gl)\a.txt"; #加载文件 $id=1; #[数字] $r='0.0.0.0'; #替换内容 $name='ip'; #替换标识 [regex]::Replace([IO.File]::ReadAllText($file,[Text.Encoding]::Default), "(?ism)(?<=\[$id].*?$name=)(?:[^`r`n]+)",$r)|sc '.\new.log'; &cmd /c pause;复制代码
TOP
qixiaobin0715 当前离线
大校
@echo off setlocal enabledelayedexpansion for /f "tokens=1,2 delims==" %%a in (1.ini) do ( if "%%a"=="[3]" ( set n=true ) else if !n!==true ( if "%%a"=="[4]" goto :o echo,%%b ) ) :o pause exit复制代码
@echo off setlocal enabledelayedexpansion for /f "delims=" %%a in (1.ini) do ( if "%%a"=="[3]" ( set n=true ) else if !n!==true ( set str=%%a echo !str:~-6! goto :o ) ) :o pause exit复制代码
路过 当前离线
三级士官
@echo off setlocal enabledelayedexpansion set f3=0 for /f "dellims=" %%a in (1.ini) do ( set f0=%%a set f2=!f0:~0,2! if !f3!==1 (set %%a) if "!f2!"=="[3" ( set f3=1 ) else ( set f1=!f0:~0,1! if "!f1!"=="[" (set f3=0) ) ) echo;%pcname% pause exit复制代码