您的位置 首页 > 数码极客

【数字上面加一横线】WORD中巧用批处理功能给文中所有数字添加空格和下划线 !

施老师:

Word的通配符功能非常强大,可以快速执行各种批量修改操作。

,今天施老师将要讲解的是给文中所有的数字批量添加空格和下划线,如果数量小,我们可以一个一个去添加下划线和空格,但是如果数量非常庞大,我们去手动添加,那会非常的繁琐,所以,此时我们只需借用查找替换通配符即可批量快速搞定。

一、我们先看一下全文,文中有中文、英文、数字、符号。我们要利用通配符给所有的数字前后各添加一个空格,然后给予下划线。该如何完成呢?

It seems only the other day—but surely it must be a long time ago—that January evening of 1844, when I camped my cattle near the old burying-ground at North Melbourne. I was bound for the Western district, where I proposed to "take up a run." And towards this pastoral paradise the dawn saw my "following" winding its way next morning.

A modest drove and slender outfit were mine; all that the hard times had spared. Two or three hundred well-bred cattle, a dray and team with provisions for six months, two stock-horses, one faithful old servant, one young ditto (unfaithful), 1 in my purse—voilà tout. Rather a limited capital to begin the world with; but what did I want with money in those days? I was a boy, which means a prince—happy, hopeful, healthy, beyond all latter-day possibilities, bound on a journey to seek my fortune. All the fairy-tale conditions were fulfilled. I had "horse to ride and weapon to wear"—that is, a 12-foot stock-whip by Nangus Jack—clothes, tools, guns, and ammunition; a new world around and[Pg 11] beyond; what could money do for the gentleman-adventurer burning with anticipation of heroic exploration? Such thoughts must have passed through my brain, inasmuch as I invested 75 per cent of my cash in the purchase of a cattle dog. Poor Dora, she barked her last some thirty-five years agone.

一、点击开始-编辑-替换打开查找和替换对话框,或者直接使用快捷键【Ctrl+H】打开查找替换对话框。


步骤二、在弹出的【查找和替换】中点击【更多】按钮,在【查找内容】中输入【[0-9]{1,}】;在【替换为】中输入【^32^&^32】;勾选使用【通配符】。

通配符说明:

[0-9] = 0到9之间单个任意数字

{1,} = 这里表示一个以上(这个通配符有很多种用法)

^32 = 半角空格

^& = 查找的内容

步骤三、先将光标定位到【替换为】中,然后点击底部的【格式】选择【字体】,进入后我们在【下划线线型】这里选择一种线型,然后确定。


步骤四、此时,返回到了【查找和替换】对话框,我们直接点击【全部替换】,即可完成。


这样文中所有的数字都已经加上了空格下划线,其他内容不变。

宁双学好网施老师(微信订阅号:myplwaai) , 欢迎分享本文,转载请保留出处。

责任编辑: 鲁达

1.内容基于多重复合算法人工智能语言模型创作,旨在以深度学习研究为目的传播信息知识,内容观点与本网站无关,反馈举报请
2.仅供读者参考,本网站未对该内容进行证实,对其原创性、真实性、完整性、及时性不作任何保证;
3.本站属于非营利性站点无毒无广告,请读者放心使用!

推荐阅读