回复 2# xczxczxcz
- ((Get-Content 0.txt)|%{
- $_.trim() -replace "^<img src=.*_536766542.jpg`" />$",'<img align="absmiddle" style="max-width:750px" src="https://img.alicdn.com/imgextra/i4/72692031/O1CN01C61X2z1QsEsx4BY8U_!!726031.jpg" />'
- })|Set-Content ".\ok.txt"
- pause
复制代码
谢谢,按照你的思路修改了一下
▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃- ((Get-Content 0.txt)|ForEach-Object{
- $_.trim() -Replace([Regex]::Escape('img src')),'img align="absmiddle" src' -Replace([Regex]::Escape('jpg" ')),'jpg" style="max-width:750px" '
- })|Set-Content ".\ok.txt"
复制代码
|