Difference between revisions of "CountryCheck"

From Sega Retro

Line 40: Line 40:
 
{{#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|}}}|San Marino}}|{{#vardefine:country|San Marino}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Serbia}}|{{#vardefine:country|Serbia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Serbia}}|{{#vardefine:country|Serbia}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Singapore}}|{{#vardefine:country|Singapore}}}}}}{{#if:
 
{{#var:country}}||{{#if:{{#pos:{{{1|}}}|Singapore}}|{{#vardefine:country|Singapore}}}}}}{{#if:

Revision as of 13:08, 11 January 2022


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

{{CountryCheck|ldifrtjsua pofjkadsfA, United Kingdom}}

becomes

the United Kingdom