,我有成千上万的文字类似:
yes:nice
up:true
six:hello
nine:mouse
twenty:cat
我希望它能够做到这一点:
yes:Nice1
up:True1
six:Hello1
nine:Mouse1
twenty:Cat1
因此,每条线都有1侧,带有文本/数字,一个结肠(:
(将另一侧带有更多的文本/数字。
有没有办法质量修改每一行以在结肠(:
(大写之后制作起始字符?
我也想知道如何在每行末尾添加任何数字。
基本上,我想知道如何在结肠后改变角色的资本化以及如何在最后添加我想要的任何数字。
这是一种完成工作的方法:
- ctrl h
- 找到什么:
^([^:]+:)(.)(.*)$
- 替换为:
$1U$2E${3}1
- 替换所有
说明:
^ : begining of line
([^:]+:) : group 1, every thing before the colon & the colon
(.) : group 2, 1 character
(.*) : group 3, every thing after the first character
$
替换:
$1 : group 1
U$2E : group 2, uppercase
${3} : group 3
1 : the digit 1, or anything you want to append.
在给定的示例中结果:
yes:Nice1
up:True1
six:Hello1
nine:Mouse1
twenty:Cat1