Template:Infobox VG/sandbox: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 23: Line 23:
|{{#if:{{{publisher|}}}|{{!}}'''Publisher(s)'''{{!!}}{{#ifeq:{{#regex:{{{publisher|}}}|/>/rs|}}||
|{{#if:{{{publisher|}}}|{{!}}'''Publisher(s)'''{{!!}}{{#ifeq:{{#regex:{{{publisher|}}}|/>/rs|}}||
<!--1st-->{{#regex:{{{publisher|}}}|/([^,]*).*/rs|[[:Category:Published by $1|$1]]|1}}<!--2nd-->{{#regex:{{{publisher|}}}|/[^,]*,([^,]*)(,.*)?/rs|,[[:Category:Published by $1|$1]]|1}}<!--3rd-->{{#regex:{{{publisher|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/rs|,[[:Category:Published by $1|$1]]|1}}|
<!--1st-->{{#regex:{{{publisher|}}}|/([^,]*).*/rs|[[:Category:Published by $1|$1]]|1}}<!--2nd-->{{#regex:{{{publisher|}}}|/[^,]*,([^,]*)(,.*)?/rs|,[[:Category:Published by $1|$1]]|1}}<!--3rd-->{{#regex:{{{publisher|}}}|/(?:[^,]*,){2}([^,]*)(,.*)?/rs|,[[:Category:Published by $1|$1]]|1}}|
<!--Hrm, these need to be nested to not output publisher multiple times, but the if complicates that. Also these comments are likely weird since they seem to output regardless if region is present-->
<!--NA-->{{#ifeq:{{#regex:{{{publisher|}}}|/.*NA.*/rs|NA}}|NA|{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
<!--NA-->{{#ifeq:{{#regex:{{{publisher|}}}|/.*NA.*/rs|NA}}|NA|{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
<!--EU-->{{#ifeq:{{#regex:{{{publisher|}}}|/.*EU.*/rs|EU}}|EU|{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?EU.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?EU.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?EU.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
 
<!--JP-->{{#ifeq:{{#regex:{{{publisher|}}}|/.*JP.*/rs|JP}}|JP|{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?JP.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?JP.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?JP.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
 
<!--AUS-->{{#ifeq:{{#regex:{{{publisher|}}}|/.*AUS.*/rs|AUS}}|AUS|{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?AUS.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?AUS.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?AUS.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
<!--NA-->{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|{{#ifeq:{{#regex:{{{publisher|}}}|/.*NA.*/rs|NA}}|NA|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?NA.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
<!--KO-->{{#ifeq:{{#regex:{{{publisher|}}}|/.*KO.*/rs|KO}}|KO|{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?KO.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?KO.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?KO.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
 
<!--RUS-->{{#ifeq:{{#regex:{{{publisher|}}}|/.*RUS.*/rs|RUS}}|RUS|{{#regex:{{{publisher|}}}|/{{#regex:{{{publisher|}}}|/.*?RUS.*?>.*?>\s*([^\[]*).*/r|$1|1}}/r|[[:Category:Published by {{#regex:{{{publisher|}}}|/.*?RUS.*?>.*?>\s*([^\[]*).*/r|$1|1}}|{{#regex:{{{publisher|}}}|/.*?RUS.*?>.*?>\s*([^\[]*).*/r|$1|1}}]]|1}}}}
}}}}
}}}}