Issue #139 followup: make sure that regexes for %S and  don't overlap