Here's one I just posted...
f(regex([Artist], /#([^[:punct:]\s])[[:punct:]\s]*?([^[:punct:]\s])#/),
ifelse(
isrange([R2], a-d), [R1]a-[R1]d,
isrange([R2], e-h), [R1]e-[R1]h,
isrange([R2], i-l), [R1]i-[R1]l,
isrange([R2], m-p), [R1]m-[R1]p,
isrange([R2], q-t), [R1]q-[R1]t,
isrange([R2], u-z), [R1]u-[R1]z,
1, [R1]*
),
*
)\replace([Artist], ;, /,)&datatype=[list]
It gets pretty ugly when you have to keep load()ing:
f(regex([Artist], /#([^[:punct:]\s])[[:punct:]\s]*?([^[:punct:]\s])#/),
save([R1], rone)save([R2], rtwo)/
ifelse(
isrange(load(rtwo), a-d), load(rone)a-load(rone)d,
isrange(load(rtwo), e-h), load(rone)e-load(rone)h,
isrange(load(rtwo), i-l), load(rone)i-load(rone)l,
isrange(load(rtwo), m-p), load(rone)m-load(rone)p,
isrange(load(rtwo), q-t), load(rone)q-load(rone)t,
isrange(load(rtwo), u-z), load(rone)u-load(rone)z,
1, load(rone)*
),
*
)\replace([Artist], ;, /,)&datatype=[list]