Delete repeated genre's in the same exact field

Or an action of the type "Format value". So there is no single place.
$Regexp() is a scripting function and may be used where a "format string" is required.
The action of the type "Replace with regular expression" asks for a source pattern (or something similar but no format string).
Also, you did not say in which action you tried to get it working.
Yet, the linked thread clearly states

So ...