用一个字符填充每个x个空格在一行中

huangapple go评论48阅读模式
英文:

Notepad++ Fill every x Space with a Character in a Single Line

问题

"基本上我想把这个转化为这个:"Augustus Sepurcius Bibulus" "Spurius Calavius Taurinus" "Titus Nigilius Celatus"

我正在尝试向我正在玩的游戏中添加大量生成的罗马名字,我必须将每个名字括在引号中,以获得没有下划线或连字符的更长名称,手动添加每个引号将需要非常长的时间和我没有的耐心。

我是一个超级巨大的Notepad++、编码、编程等新手,所以任何帮助将不胜感激。"

英文:

Basically I want to take this: Augustus Sepurcius Bibulus Spurius Calavius Taurinus Titus Nigilius Celatus
and turn it into this: "Augustus Sepurcius Bibulus" "Spurius Calavius Taurinus" "Titus Nigilius Celatus"

I'm trying to add a (ton) of generated Roman names to a game I'm playing and I have to enclose each name in quotations to get a longer name free of underscores or hyphens, and adding in each quotation would take a ridiculous amount of time and require patience I don't have.

I'm a super-huge notepad++, coding, programming, etc. noob so any help would be extremely appreciated.

答案1

得分: 2

如果您想用引号括起一组三个名称,可以匹配一组中的三个名称,然后替换为带引号的匹配。确保在替换窗口中选中正则表达式,然后替换(全部替换):

(\w+ \w+ \w+)

用以下内容替换:

"$1"

$1 是对第一个(在本例中是唯一的)匹配组的引用。

英文:

If you want to enclose groups of 3 names in quotes. You can match the three names in a group then replace with the quoted match. Make sure Regular expression is checked in your replace window and replace (Replace All):

(\w+ \w+ \w+)

with:

"$1"

$1 is a reference to the first (and in this case unique) matched group.

huangapple
  • 本文由 发表于 2023年6月26日 14:19:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76553984.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定