Description of the problem including expected versus actual behavior:
When combining an affix setting with a group setting, the affix setting does not correctly find the namespaces anymore due to a non-working regex in Setting.AffixKey, when any setting inside that group setting is supplied
Steps to reproduce:
public void testAffixNamespacesWithGroupSetting() {
final Setting.AffixSetting<Settings> affixSetting =
Setting.affixKeySetting("prefix.","suffix",
(key) -> Setting.groupSetting(key + ".", Setting.Property.Dynamic, Setting.Property.NodeScope));
// works
assertThat(affixSetting.getNamespaces(Settings.builder().put("prefix.infix.suffix", "anything").build()), hasSize(1));
// breaks, has size 0
assertThat(affixSetting.getNamespaces(Settings.builder().put("prefix.infix.suffix.anything", "anything").build()), hasSize(1));
}