Notepad++ 查找标签并将行替换为大写

Notepad++ 查找标签并将行替换为大写

我有 xml 文件。它包含以下内容:

<name> big company</name>
<address> 15/F, 1219TH YORK STREET, dale shreedwood </address>
<date> 2023/15/19</date>
<info_num>14256</info_num>
<name> SMALL COMPANY</name>
<address> 12/F, 1220TH YORK STREET, YORKSHIRE KIT </address>
<date> 2023/15/19</date>
<info_num>14256</info_num>
<name> WE COMPANY</name>
<address> 12/F, 5TH YORK1 STREET, Ononl line  KIT </address>
<date> 2023/15/19</date>
<info_num>14256</info_num>

将地址字段的所有内容更改为大写,例如:

<name> big company</name>
<address> 15/F, 1219TH YORK STREET, DALE SHREDWOOD </address>
<date> 2023/15/19</date>
<info_num>14256</info_num>
<name> SMALL COMPANY</name>
<address> 12/F, 1220TH YORK STREET, YORKSHIRE KIT </address>
<date> 2023/15/19</date>
<info_num>14256</info_num>
<name> WE COMPANY</name>
<address> 12/F, 5TH YORK1 STREET, ONONL LINE  KIT </address>
<date> 2023/15/19</date>
<info_num>14256</info_num>

答案1

您可以尝试以下操作:

  • Ctrl+H
  • 找什么:<address>\K(.+)(?=<)
  • 用。。。来代替:\U\1
  • 搜索模式:Regular expression
  • 点击Replace All

相关内容