
[已解決]求修改PowerShell添加過濾條件最后由 smss 于 -7-12 12:36
以<ContentProviderBinder為節點則不修改如下例子<ContentProviderBinder name=missed_calls uri=content://call_log/calls columns=date,number,name,type,duration order=date DESC where=type=3 AND new=1 countName=call_count/>能用 感覺改的不太對nclick="copycode($('code0'));">復制代碼
- PowerShell $s=[IO.File]::ReadAllText('8.xml', [Text.Encoding]::UTF8) -replace '(?<!<[^<>s]+)s+'; sc 8.xml $s -Enc UTF8
nclick="copycode($('code1'));">復制代碼
- @echo off
- PowerShell $str=[IO.File]::ReadAllText('a.xml',[Text.Encoding]::UTF8) -replace '<!--(?:(?!-->).)*-->'; $str=[regex]::Replace($str, '<(?!ContentProviderBinders)[^<>]*>', {param($m);$s=$m.Value;$s -replace '(?<!<[^<>s]+)s+'}); [IO.File]::WriteAllText('b.xml', $str, [Text.Encoding]::UTF8)
- pause

