使用记事本++我有以下文字。
This little piggy went to market, \textbf{smith1774}
This little \textbf{ben1864} piggy stayed \textbf{mueller2867} home,
This little piggy had roast beef
Run Code Online (Sandbox Code Playgroud)
现在我想删除\text{}但将文本保留在中间。
由于我的文档包含在其他位置,因此我无法分两步进行简单的搜索和替换 ( \text{+ }) {}.....
另一种方法是.*?在捕获组中使用非贪婪通配符 ( )。
搜索:
\\textbf\{(.*?)\}
Run Code Online (Sandbox Code Playgroud)
用。。。来代替:
\1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
46797 次 |
| 最近记录: |