Thanks, D. In my sample script given, I replaced
$loop(%title%,1)
with your
$loop(%TITLE%$regexp($regexp(%TITLE%,'\l','0'),'\u','1'),1)
and that gave case-insensitivity as I required.
Re diacritics, my full script is is intended to output a playlist containing all tracks showing deviation in title, e.g. having title differing from that of any track in presence/absence of (Spanish) diacritics or any character other than letters or digits, or letter case. With your case fix, that script is now:
#EXTM3U
$loop($regexp($replace($lower(%title%),á,a,é,e,í,i,ó,o,ú,u,n,ñ),'[^a-zA-Z0-9]',))$loop(%TITLE%$regexp($regexp(%TITLE%,'\l','0'),'\u','1'),1)$loopend()$ifgreater(%_max_counter%,1,$loop(%title%)#EXTINF:%_lentgh%,%artist% - %title%
%_path%
$loopend()
,)$loopend()
From this list of titles
A bailar
A bailar
Adios muchachos
Adios, muchachos
Chique
Chiqué
La Cumparsita
La cumparsita
Vida Mía
Vida mía
it puts these in a EXTM3U playlist
Adios muchachos
Adios, muchachos
Chique
Chiqué
La Cumparsita
La cumparsita
Vida Mía
Vida mía
.
I then load the playlist into Mp3tag for manual correction of the faulty titles.