Hi, @saltshaker2112, @terry-r, @coises, @mark-olson, @coises and All,
Ah… OK. But, if we have to be less restritive on the text to keep, we must be more restrictive regarding the text to get rid of ! Thus :
The part BEFORE the song’s title, which will be deleted, is :
Any NON-word text followed with a number, followed by anything with a final dash AND, at least, ONE blank char
Any number, up to three digits, possibly preceded with blank chars and followed with, at least, ONE blank char
The part AFTER the song’s title, which will be deleted, is :
At least ONE blank char, followed by any char among ([{<_-, followed by possible space chars, followed with a duration ( \d{1,2}(:)\d{2} ), followed with possible space chars, followed with any char among )]}>_- and finally followed with a combination of blank and new-line chars
This part, which manages possible line-breaks, is then replaced by a single line-break ONLY
So, starting with the INPUT text, below :
01) - Bastille Day 5:19
02. - Lakeside Park [ 4:41 ]
[03] - Bytor And The Snowdog 5:43
04 - Xanadu 12:06
05 - A Farewell To Kings ( 6:35 )
Something For Nothing 4:13
((07 - Cygnus X-1 10:22
01 - Anthem 4:15
02- Closer To The Heart 999 - 3:35 -
[03 ] - 2112 18:23
( 03) - (2112) This Is A Test [2012 ] 18:23
03}} - [ 2112 ] This Is An Other Test 2012 <18:23 >
04 Working Man / Fly By Night / In The Mood / Drum Solo _15:16_
05 - Cinderella Man 5:14
Here is my new version of the first regex S/R, which get a clean list of the song’s titles :
SEARCH (?x) ^ \h* (?: \W* \d+ \W* \h* - | \d{1,3} ) \h+ | \h+ [([{<_-]? \x20* \d{1,2} ( : ) \d{2} \x20* [)]}>_-]? ( \h* \R )+
REPLACE ?1\r\n
And you get this OUTPUT text :
Bastille Day
Lakeside Park
Bytor And The Snowdog
Xanadu
A Farewell To Kings
Something For Nothing
Cygnus X-1
Anthem
Closer To The Heart 999
2112
(2112) This Is A Test [2012 ]
[ 2112 ] This Is An Other Test 2012
Working Man / Fly By Night / In The Mood / Drum Solo
Cinderella Man
Hope that it’s the expected one !!
Of course, the second regex, regarding case changes, is the same as in my previous post !
BR
guy038
P.S. Note that the simple lines, below :
123 789 15:47
00 15:47
With a song’s title containing less than four digits ONLY, with or without a leading rank, would wongly end up to :
15:47
03:19
I chose the limit of three digits, in order that lines with a leading rank up to three digits, immediately followed by the title, as below, are correctly handled ! Indeed :
456 The most beautiful song of all the times (12:53)
Would correctly result as :
The most beautiful song of all the times