function getExtsFromArgs(args, arg) {
	if (arg) {
		const parsedArgs = minimist(args);
		return undot(unquote(parsedArgs[arg]));
	} else {
		// If no argument is specified, assume that the pattern is the last section
		const pattern = unquote(args.pop());
		return unbracket(pattern.split('.').pop());
	}
}
@param {string[]} args
@param {string} [arg]
@returns {string}