code: function validateUnicodeGroupName(name, state) {
    const isUnicodeName = uRe.test(name) || ucpRe.test(name);
    const isUnicodeState = (state === 'u' || state === 'xu' || state === 'u_class');
  
    if (isUnicodeName && !isUnicodeState) {
      throw new SyntaxError(`invalid group Unicode name "${name}", use \`u\` flag.`);
    }
  }
docs: Validates Unicode group name.