Difference between revisions of "CountryCheck"

From Sega Retro

Line 31: Line 31:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Romania}}|{{#vardefine:country|Romania}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Romania}}|{{#vardefine:country|Romania}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Russia}}|{{#vardefine:country|Russia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Russia}}|{{#vardefine:country|Russia}}}}}}{{#if:
 +
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Singapore}}|{{#vardefine:country|Singapore}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Slovenia}}|{{#vardefine:country|Slovenia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Slovenia}}|{{#vardefine:country|Slovenia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Spain}}|{{#vardefine:country|Spain}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Spain}}|{{#vardefine:country|Spain}}}}}}{{#if:

Revision as of 08:17, 24 May 2021


Quick and not-so-great template to extract country names from addresses.

{{CountryCheck|ldifrtjsua pofjkadsfA, United Kingdom}}

becomes

the United Kingdom