def match_xxx_for_country_n_adm1( name, xxx ) # xxx e.g. parts|counties|etc.

    # auto-add required country n states (from folder structure)
    #
    #  e.g.  de-deutschland!/3--by-bayern/parts  (regierungsbezirke)
    #        europe/de-deutschland!/3--by-bayern/parts
    #
    #    at-austria!/1--n-niederoesterreich/counties  (bezirke)

    xxx_pattern           = "#{xxx}"

    if name =~ /(?:^|\/)#{WORLD_COUNTRY_CLASSIC_PATTERN}\/#{WORLD_STATE_MODERN_PATTERN}\/#{xxx_pattern}/  ||
       name =~ /(?:^|\/)#{WORLD_COUNTRY_CLASSIC_PATTERN}\/#{WORLD_STATE_CLASSIC_PATTERN}\/#{xxx_pattern}/

      country_key = $1.dup
      state_key  = $2.dup
      yield( country_key, state_key )
      true # bingo - match found
    else
      false # no match found
    end
  end
def match_xxx_for_country_n_adm1( name, xxx ) # xxx e.g. parts|counties|etc.

    # auto-add required country n states (from folder structure)
    #
    #  e.g.  de-deutschland!/3--by-bayern/parts  (regierungsbezirke)
    #        europe/de-deutschland!/3--by-bayern/parts
    #
    #    at-austria!/1--n-niederoesterreich/counties  (bezirke)

    xxx_pattern           = "#{xxx}"

    if name =~ /(?:^|\/)#{WORLD_COUNTRY_CLASSIC_PATTERN}\/#{WORLD_STATE_MODERN_PATTERN}\/#{xxx_pattern}/  ||
       name =~ /(?:^|\/)#{WORLD_COUNTRY_CLASSIC_PATTERN}\/#{WORLD_STATE_CLASSIC_PATTERN}\/#{xxx_pattern}/

      country_key = $1.dup
      state_key  = $2.dup
      yield( country_key, state_key )
      true # bingo - match found
    else
      false # no match found
    end
  end
todo/check: adm1 => state
   why use adm1 and not state ??  duplicate of match___country_n_state ??