I didn’t realy want to start a discussion about the usefullness/usabillaty of multi-value-tagging. My goal was to understand the syntax of wikidata-tags to build a validation-tool to find errors.
This Regex-statement only matches on (secondary)-wikidata-entrys that are mapped according to the wiki:
^(\;)*Q[0-9]+((\;)+Q[0-9]+)*(\;)*$
The statement finds every list of wikidata-IDs/empty values seperated by only semicolons.