Template:Year in sub-country division category

{{Category other |{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d in .+$|start=1|match=1|plain=false |nomatch=%%nomatch%%}} |%%nomatch%%|{{Error|ERROR. Template:Year in sub-country division category is for use only on pages with a title of the form "Category:YYYY in Foo", where YYYY is a 4-digit year and "Foo" is the name of sub-country division.}} -->|{{Year in sub-country division category/core| year={{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d%d|start=1|match=1|plain=false}}| division={{{division|{{#invoke:String|replace|source={{PAGENAME}}|pattern=^%d%d%d%d in |replace=|count=1|plain=false}}}}| country={{{1}}}}}}}||{{Error|message=ERROR. Template:Year in sub-country division category is for use only on category pages}} }}