Special Caracters [ ]

Continuing the discussion from Adding Bpm Right After "- "caracter:

I was wondering why these caracters is not showing i was reading it but its not very clear to me can someone explain in simpler words why my script is not adding them in the final result
Heres the script : $regexp(%_directory%,(.*?) - (.*),$1 - %bpm%bpm %dummy%$2) [%PUBLISHER%]


The square brackets work as some kind of "if" condition.
See the documentation:

If you want to use [ then use them enclosed in apostrohes: '[' -> '['%perfomer%']'

Another question: which function is %dummy% supposed to have in your format string?

You reorder the content of the first capturing group from the regular expression like this:
$1
followed by a space and a hyphen and a space
followed by the content of your %bpm% tag
followed by the text bpm and a space
followed by the content of %dummy% (whatever this should be...)
and then you add the content of the second capturing group
$2
then you append the content of your %PUBLISHER% tag but only if there is a content available. If there is no content in %PUBLISHER% there will be nothing added.

What exactly is your script not adding at what position?