- 帖子
- 122
- 积分
- 251
- 技术
- 1
- 捐助
- 0
- 注册时间
- 2009-8-24
|
[文件操作] (已解决)批处理能处理文本中的段落,比如整个段落截取,或删除呢?
本帖最后由 yuanyannian 于 2014-7-25 19:55 编辑
批处理能处理文本中的某个段落,比如整个段落截取,或删除呢?
比如还是这个文本,其中如下小节:
[AddReg]
HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Ntfs",0x00010003,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Control\FontAssoc","ANSI(00)",0x00000002,"YES"
HKLM,"SYSTEM\CurrentControlSet\Control\FontAssoc","SYMBOL(02)",0x00000002,"NO"
HKLM,"SYSTEM\CurrentControlSet\Control\FontAssoc","OEM(FF)",0x00000002,"YES"
...
[DelReg]
HKLM,"SYSTEM\CurrentControlSet\Services\fsvga"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0402"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0403"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0404"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0405"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0406"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0407"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0408"
HKLM,"SYSTEM\CurrentControlSet\Control\Nls\Locale","0409"
...
我想将节“[AddReg]” 其下的所有内容全部截取到一个新文本中,或者删除节“[DelReg]” 及其所有内容,
该如何处理呢? |
|