function nested(pattern, depthLog2) {
		for (var i = 0; i < depthLog2; i++) {
			pattern = pattern.replace(/<<self>>/g, function () { return '(?:' + pattern + ')'; });
		}
		return pattern.replace(/<<self>>/g, '[^\\s\\S]');
	}
Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.

@param {string} pattern
@param {number} depthLog2
@returns {string}