The magic is all in the
switch.
Code:
strcat(
switch(
stripped,
# This regex tests to see if initials are used.
'.\s', initials,
'.', shortened,
field('series')
),
test(
s_index,
strcat(' [', s_index, '] '),
''
),
field('title')
);
Change the regex in red to match the stripped series, e.g.
Repeats to match only once there are two spaces (or more, of course).