我想格式化数据库使用关键字,例如(2016)在编辑器Notepad ++中将转换/格式化无序结构放在每一行的末尾!
这是在提取样本之前:
Airbourne - Breakin' Outta Hell (2016) Anger Rising - Come Hell Or High Water (2016) Black Star Furies - Vamp In Paradise (2016) Black Swamp Water - Chapter One (2016) Blues Pills - Golden Treasures (2016) Cactus - Black Dawn (2016)Captain Frapat - Coming Home (2016) Cornerstone - Reflections (2016) Crystal Ball - Déjà-Voodoo (2016)Delain - Moonbathers 2CD (2016) Edge Of Broken - Dare To Dream (2016)
并且在使用记事本++示例字(2016)中的正则表达式后的每个行的末尾 - 而不是开头线路!
样本:
Airbourne - Breakin' Outta Hell (2016)
Anger Rising - Come Hell Or High Water (2016)
Black Star Furies - Vamp In Paradise (2016)
Black Swamp Water - Chapter One (2016)
Blues Pills - Golden Treasures (2016)
Cactus - Black Dawn (2016)
Captain Frapat - Coming Home (2016)
Cornerstone - Reflections (2016)
Crystal Ball - Déjà-Voodoo (2016)
Delain - Moonbathers 2CD (2016)
Edge Of Broken - Dare To Dream (2016)
答案 0 :(得分:1)
答案 1 :(得分:1)
答案 2 :(得分:1)
答案 3 :(得分:1)
\(2016\)\h*
或\(\d+\)\h*
$0\n
<强>解释强>
\( : open parenthesis
2016 : literally "2016" or \d+ : 1 or more digits
\) : close parenthesis
\h* : 0 or more horizontal spaces
<强>替换强>
$0 : whole match, ie. (2016) or (year)
\n : line break (you could use \r\n if requested)
给定示例的结果:
Airbourne - Breakin' Outta Hell (2016)
Anger Rising - Come Hell Or High Water (2016)
Black Star Furies - Vamp In Paradise (2016)
Black Swamp Water - Chapter One (2016)
Blues Pills - Golden Treasures (2016)
Cactus - Black Dawn (2016)
Captain Frapat - Coming Home (2016)
Cornerstone - Reflections (2016)
Crystal Ball - Déjà-Voodoo (2016)
Delain - Moonbathers 2CD (2016)
Edge Of Broken - Dare To Dream (2016)