开发者

Regular expression in eclipse

开发者 https://www.devze.com 2023-03-03 00:24 出处:网络
Hi I have many xml file, in each I would like change this: <DNI code=\"000.010.000.100\"> <Item>1580634903404</Item>

Hi I have many xml file, in each I would like change this:

<DNI code="000.010.000.100">
  <Item>1580634903404</Item>
</DNI>

for:

<DNI code="000.010.000.100">
  <Item>0000000000</Item>
</DNI>

for example.

Please need your help.

Sorry,

this:

<DNI code="000.010.000.100">
  <Item>15.80634.903.4-P</Item>
</DNI>
<XDR code="000开发者_开发知识库.010.000.020">
   <Item>9384934P</Item>
 </XDR>
  <YXR code="000.060.010.0030">
   <Item>Hello</Item>
 </YXR>

result:

<DNI code="000.010.000.100">
  <Item>0000000000</Item>
</DNI>

Thanks.


Look for: <Item>\d+[\<\w\"=\./\>\-\s]+</YXR>

Replace with: <Item>0000000000</Item> </DNI>

0

精彩评论

暂无评论...
验证码 换一张
取 消