NotePad ++替换问题

Nge*_*Lay 13 regex notepad++

我有一个使用NotePad ++进行大量文本编辑的文件.

例如

<span class="italic">some text</span><span class="bold">another text or some text</span>

我想用NotePad ++的正则表达式取代替换

<span class"italic>some text</span><i>some text</i><span class="bold">another text or some text</span><b>another text or some text</b>

我能够匹配跨度文本然而如何用NotePad ++替换它们

查找<span class="italic">text12312</span>并替换它<i>[a-zA-Z]*</i>实际上将"[a-zA-Z]*"文本放入替换字符串而不是"text12312".

Ala*_*ore 24

<span class="italic">([^<]+)</span> => <i>\1</i>

<span class="bold">([^<]+)</span> => <b>\1</b>

[^<]+匹配除了之外的任何字符中的一个或多个<,并且括号在组#1中捕获它.\1将捕获的文本插入替换字符串.