- Rem '/*=========修改cas.properties信息=============*/
- @echo off
- echo %input:"=%
- pause
- cd "%input:"=%"
- (for /f "delims=" %%a in (web.xml) do (
- set "str=%%a"
- setlocal enabledelayedexpansion
- set "str=!str:192.168.1.108=%IP_addr: =%!"
- echo,!str!
- endlocal
- ))>"%input:"=%\web.xml.tmp"
- move /y "%input:"=%\web.xml.tmp" "%input:"=%\web.xml"
复制代码 这是代码,我想修改web.xml文件中192.168.1.108为本地IP也就是%IP_addr: =%,这段代码是可执行的,
但是修改如下代码的时候:
<init-param>
<param-name>url-pattern</param-name>
<param-value>((?!/ums_client_interface).)*</param-value>
</init-param>
!号在新文件中就没有了,用了很多方法解决不了,请教各位大侠!!!!!!!!!!!!!!!!!!!!!! |