LibreCalc 搜索和替换,搜索 [] 并替换它,以及它的内容

Posted

技术标签:

【中文标题】LibreCalc 搜索和替换,搜索 [] 并替换它,以及它的内容【英文标题】:LibreCalc Search and Replace, Search for [] and replace it, along with its contents 【发布时间】:2014-04-17 20:35:59 【问题描述】:

我正在编制电子游戏列表。 目前,我正在使用***来做这件事。 当我将 ps3 游戏复制到 LibreCalc 时,复制的视频游戏标题在行尾包含引用括号。我没有删除这一行,而是尝试搜索和替换括号及其内容。

我在这方面的努力仍然失败。下面是一个例子,

Rune Factory: Tides of Destiny[629]
Fight Night Champion[268]
Dragon Age II[209]
Major League Baseball 2K11[427]
MLB 11: The Show[459]
Warriors: Legends of Troy[817]
Dynasty Warriors 7[222]
Homefront[334]
Top Spin 4[773]
MotorStorm: Apocalypse[474]
Crysis 2[164]
Lego Star Wars III: The Clone Wars
The Tomb Raider Trilogy[765]
NASCAR 2011: The Game[488]
Shift 2: Unleashed[650]
Tiger Woods PGA Tour 12: The Masters[746]
WWE All Stars[839]
Michael Jackson: The Experience[448]
Rio[614]
Mortal Kombat[469]
Portal 2[563]
SOCOM 4: U.S. Navy SEALs[20]
AFL Live[16]
Operation Flashpoint: Red River[542]
Man vs. Wild[430]
Sniper: Ghost Warrior[679]
El Shaddai: Ascension of the Metatron[233]
Virtua Tennis 4[808]
Thor: God of Thunder[740]
MX vs. ATV Alive[478]
Brink[116]
Lego Pirates of the Caribbean: The Video Game[391]
Battle vs. Chess[82]
L.A. Noire[379]
Dirt 3[196]
Kung Fu Panda 2[377]
Hunted: The Demon's Forge[336]
Infamous 2[345]
Red Faction: Armageddon[599]
Yakuza: Dead Souls[849]
Duke Nukem Forever[217]
Alice: Madness Returns[29]
Child of Eden[146]
Transformers: Dark of the Moon[777]
Dungeon Siege III[218]
Cars 2: The Video Game[138]
F.E.A.R. 3[247]
Shadows of the Damned[647]
Atelier Meruru: The Apprentice of Arland[67]
Bleach: Soul Resurrección[108]
Angel Love Online[38]
Angel Senki
Air Conflicts: Secret Wars[24]
Harry Potter and the Deathly Hallows: Part II[322]
NCAA Football 12[511]
Captain America: Super Soldier[137]
Call of Juarez: The Cartel[136]
Phineas and Ferb: Across the 2nd Dimension[558]
Hyperdimension Neptunia Mk2[338]
Deus Ex: Human Revolution[191]
Bodycount[111]
Madden NFL 12[415]
Driver: San Francisco[216]
Dead Island[175]
Resistance 3[609]
Warhammer 40000: Space Marine[815]
NHL 12[526]
Tales of Xillia[718]
God of War: Origins Collection[298]
Tom Clancy's Splinter Cell Classic Trilogy HD[762]
Supremacy MMA[712]
Dark Souls[169]
Ico & Shadow of the Colossus Collection[340]
FIFA 12[263]
PES 2012: Pro Evolution Soccer[557]
Dynasty Warriors 7: Xtreme Legends[223]
Ra.One: The Game[584]
Crysis[163]
Rage[586]
Spider-Man: Edge of Time[692]
NBA 2K12[498]
The Cursed Crusade[733]
Ace Combat: Assault Horizon[12]
Skylanders: Spyro's Adventure[675]
Batman: Arkham City[79]
Ratchet & Clank: All 4 One[591]
Rocksmith[627]
The Sims 3: Pets[658]
The Adventures of Tintin: The Secret of the Unicorn[14]
Back to the Future: The Game[71]
Battlefield 3[83]
Dragon Ball Z: Ultimate Tenkaichi[212]
Puss in Boots[581]
The Idolmaster 2[736]
Uncharted 3: Drake's Deception[795]
GoldenEye 007: Reloaded[301]
The Lord of the Rings: War in the North[401]
Sonic Generations[683]
Call of Duty: Modern Warfare 3[131]
Metal Gear Solid HD Collection[445]
The Elder Scrolls V: Skyrim[236]
Lego Harry Potter: Years 5–7[388]
Assassin's Creed: Revelations[63]
Jurassic Park: The Game[358]
Cartoon Network: Punch Time Explosion XL[141]
Need for Speed: The Run[516]
Saints Row: The Third[633]
Apache: Air Assault[42]
After Hours Athletes[21]
Ni no Kuni[531]
WWE '12[838]
The King of Fighters XIII[371]
Just Dance 3[361]
Order Up![543]
Final Fantasy XIII-2[273]
Zack Zero[853]
Armored Core V[52]
NeverDead[520]
Soulcalibur V[689]
Kingdoms of Amalur: Reckoning[374]
The Darkness II[735]
Grand Slam Tennis 2[306]
Twisted Metal[787]
UFC Undisputed 3[792]
Binary Domain[95]
Asura's Wrath[64]
Syndicate[714]
Gal*Gun[288]
Naruto Shippuden: Ultimate Ninja Storm Generations[485]
SSX[698]
One Piece: Pirate Warriors[539][540]
Blades of Time[101]
Major League Baseball 2K12[428]
Mass Effect 3[436]
MLB 12: The Show[460]
Street Fighter X Tekken[706]
Top Gun: Hard Lock[771]
Mobile Suit Gundam Unicorn[465]
FIFA Street[265]
Silent Hill: Downpour[653]
Silent Hill HD Collection[654]
Ninja Gaiden 3[535]
Resident Evil: Operation Raccoon City[605]
Ridge Racer Unbounded[613]
Battleship[87]
Prototype 2[577]
Max Payne 3[438]
Dragon's Dogma[214]
Tom Clancy's Ghost Recon: Future Soldier[756]
Dirt: Showdown[197]
Inversion[350]
Tokyo Jungle[753]

我的部分问题似乎是括号是正则表达式中使用的字符。

有人可以帮助我,或者让我朝着正确的方向解决这个问题。

【问题讨论】:

【参考方案1】:

您可以escape the brackets with a backslash 将它们视为常规字符。在此基础上,您可以使用以下正则表达式匹配所有方括号containing only digits:

\[[:digit:]*\]

Replace with 框为空时,搜索/替换运行应删除示例中的所有脚注标记。

由于只有左括号是 LO Calc 的特殊字符,因此以下内容也应该有效:

\[[:digit:]*]

【讨论】:

以上是关于LibreCalc 搜索和替换,搜索 [] 并替换它,以及它的内容的主要内容,如果未能解决你的问题,请参考以下文章

如何使用sed搜索和替换]、[? [关闭]

如何使用 Perl 进行批量搜索和替换?

如何在二维数组中搜索单词和替换

Vim - 搜索和替换结果

如何在 Vim 中的单个命令调用中从光标位置开始并环绕文件末尾进行全局搜索和替换?

如何在 Notepad++ 中搜索、替换和保留大小写?