MS Word的正则表达式,用于检测字幕 [英] Regex for MS Word for detecting subtitle

查看:89
本文介绍了MS Word的正则表达式,用于检测字幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MS Word文档,其字幕全部为字体大小18px和粗体.我想找到所有这些并将其替换为其他东西.我在这里使用Ctrl + H,启用wldcards,选择字体样式(字体大小和粗体),并使用正则表达式(*{1,}).但是,此正则表达式将查找每个单个字符的出现次数.如何使每个完整的字幕都出现一次?谢谢

I have a MS Word Documents with its subtitle all in font-size 18px and bold. I want to find them all and replace them with something else. There I use Ctrl+H, enabling wldcards, chossing the font style (fontsize and bold), and use the regex (*{1,}). However, this regex would find occurrences for every single character. How can I make every whole subtitle as a single occurence? Thanks

推荐答案

使用单词通配符查找/替换,其中:

Use a Word wildcard Find/Replace, where:

Find = ([!^13]@)^13
Replace = Before Text \1 After text^p

,然后将字体属性指定为查找"参数的一部分.不需要任何代码,尽管您确实可以使用宏-宏记录器将复制F/R参数.

and you specify the font attributes as part of the Find parameters. No code required, though you could use a macro if you really want to - the macro recorder will replicate the F/R parameters.

这篇关于MS Word的正则表达式,用于检测字幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆