The documentation on Scripting Functions states for $regexp:
Please note that you have to escape comma and other special characters in expr.
So the most easiest way would be to just enclose the expression in ' (given that [ and ] are special characters in Mp3tag's Format Strings and Available Placeholders)
$regexp(%TITLE%,'[^0-9a-zA-Z]',)