您的位置 首页 > 数码极客

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

施老师:

Word的通配符功能非常强大,可以快速执行各种批量修改操作。今天施老师要说明的是,在文章的所有数字上大量添加空格和下划线。数量少的话,一次可以添加一条下划线和空格,但如果数量非常大,我们手动添加的话,会非常麻烦。所以现在我们只要找到,就能找到替代通配符,大量快速处理。(大卫亚设,Northern Exposure)。

首先,我们先看一下有汉语、英语、数字、符号的全文。我将使用通配符在所有数字前后添加空格,然后加下划线。该如何完成呢?

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 buryingand towards this pastoral paradise the dawn saw my ' following ' winding its way next morning '

a modest drove and slender outfit weremine;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。One faithful old servant,one young ditto (unfaithful),1 in my purse-voil yatout . rather a limited capital to begin the worse burseI was a boy、which means a prince-happy、hopeful、healthy、beyond all latter-day possibilities、Bound on a journey to seeka 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,InAs much as I invested 75 per cent of my cash in the purchase of a cattle dog . poor Dora,shhh

首先,单击开始-编辑-替换以打开查找和替换对话框,或使用快捷键[Ctrl H]打开查找替换对话框。

在步骤2的弹出式“查找和替换”中单击“更多”按钮,然后在“查找内容”中键入[[0-9] {1,}]。在「变更为」中输入[32 32]。选择“使用通配符”。

通配符说明:

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

{1,}=此处有一个或多个含义(此通配符有多种用途)

32=半角空格

=要查找的内容

第3步,首先将光标放在“更改为”中,然后单击底部的“格式”以选择“字体”。输入后,在“下划线线型”下选择并确认线型。

步骤4,如果此时返回到“查找和替换”对话框,则直接单击“全部替换”即可。

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

宁爽很了解网络石老师(微信订单号:myplwaai)。请分享这篇文章。转载请保存出处。

关于作者: luda

无忧经验小编鲁达,内容侵删请Email至wohenlihai#qq.com(#改为@)

热门推荐