Hi, @john-goewie, @coises and All,
@coises, I’ve analyzed your method and, really, your method is quicker and more efficient than mine ! However, for more than, let’s say, a dozen of lines to concatenate, I suppose that building the associate regexes would be tedious !
BTW, I tried a variant of your method which works fine, too :
In this variant, I prefered to not use the \t separator and included the EOL of groups 8 to 13 within the groups themselves !
Thus, from this INPUT text :
mklink /D "E:\Drum LIB\CLAP
mklink /D "E:\Drum LIB\HIHAT
mklink /D "E:\Drum LIB\KICK
mklink /D "E:\Drum LIB\PERCUSSION
mklink /D "E:\Drum LIB\CRASH
mklink /D "E:\Drum LIB\SNARE
mklink /D "E:\Drum LIB\STAB
SAMPLECD1 - Techno - Clap
SAMPLECD1 - Techno - Hihat
SAMPLECD1 - Techno - Kick
SAMPLECD1 - Techno - Perc
SAMPLECD1 - Techno - Ride
SAMPLECD1 - Techno - Snare
SAMPLECD1 - Techno - Stab
" "
" "
" "
" "
" "
" "
" "
H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Clap
H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Hihat
H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Kick
H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Perc
H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Ride
H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Snare
H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Stab
"
"
"
"
"
"
"
The regex S/R is a bit simplified and becomes :
SEARCH (?-s)^(.*)\R(.*)\R(.*)\R(.*)\R(.*)\R(.*)\R(.*)\R(.*\R)(.*\R)(.*\R)(.*\R)(.*\R)(.*\R)(.*)
REPLACE $1$8$2$9$3$10$4$11$5$12$6$13$7$14
and, after 3 clicks on the Replace All button, we get :
mklink /D "E:\Drum LIB\CLAPSAMPLECD1 - Techno - Clap" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Clap"
mklink /D "E:\Drum LIB\HIHATSAMPLECD1 - Techno - Hihat" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Hihat"
mklink /D "E:\Drum LIB\KICKSAMPLECD1 - Techno - Kick" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Kick"
mklink /D "E:\Drum LIB\PERCUSSIONSAMPLECD1 - Techno - Perc" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Perc"
mklink /D "E:\Drum LIB\CRASHSAMPLECD1 - Techno - Ride" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Ride"
mklink /D "E:\Drum LIB\SNARESAMPLECD1 - Techno - Snare" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Snare"
mklink /D "E:\Drum LIB\STABSAMPLECD1 - Techno - Stab" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Stab"
Then, the simple S/R, below, adds the missing \ character, right before the first SAMPLECD1 string
SEARCH (?-i)[^\\](?=SAMPLECD1)
REPLACE $0\\
Giving the expected OUTPUT text :
mklink /D "E:\Drum LIB\CLAP\SAMPLECD1 - Techno - Clap" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Clap"
mklink /D "E:\Drum LIB\HIHAT\SAMPLECD1 - Techno - Hihat" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Hihat"
mklink /D "E:\Drum LIB\KICK\SAMPLECD1 - Techno - Kick" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Kick"
mklink /D "E:\Drum LIB\PERCUSSION\SAMPLECD1 - Techno - Perc" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Perc"
mklink /D "E:\Drum LIB\CRASH\SAMPLECD1 - Techno - Ride" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Ride"
mklink /D "E:\Drum LIB\SNARE\SAMPLECD1 - Techno - Snare" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Snare"
mklink /D "E:\Drum LIB\STAB\SAMPLECD1 - Techno - Stab" "H:\SAMPLEBASE\SAMPLECD1 - Techno\SAMPLECD1 - Techno - Stab"
BR
guy038