In addition to @Nate's answer (built-in regex %\((\w+)\)s works for PostgreSQL), i've managed to get this work only via reordering the patterns and moving target regex to the top of the list.
One could also try to disable other rules and see if that helps.