在嵌套引号之间抓取值并将其替换为一些命令中的内容

时间:2015-11-24 09:07:08

标签: regex replace notepad++

在我之前的帖子中,我学会了如何用引号"Sample text"括起来的文字,并通过正则表达式将其替换为\command{Sample text}

Search: "(.*?)"
Replace: \\command{$1}

如果有嵌套引号,我该怎么做。例如:

"This quote which involves "inner quotes," and possibly even more nested quotes."

要:

\command{This quote which involves \command{inner quotes,} and possibly even more nested quotes.}

(我通常在记事本++中工作。)

0 个答案:

没有答案