function findEndTag(schema, html, startIndex) {
		var count = 1, index, matches, tokenRegExp, shortEndedElements;

		shortEndedElements = schema.getShortEndedElements();
		tokenRegExp = /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g;
		tokenRegExp.lastIndex = index = startIndex;

		while ((matches = tokenRegExp.exec(html))) {
			index = tokenRegExp.lastIndex;

			if (matches[1] === '/') { // End element
				count--;
			} else if (!matches[1]) { // Start element
				if (matches[2] in shortEndedElements) {
					continue;
				}

				count++;
			}

			if (count === 0) {
				break;
			}
		}

		return index;
	}
Returns the index of the end tag for a specific start tag. This can be
used to skip all children of a parent element from being processed.

@private
@method findEndTag
@param {tinymce.html.Schema} schema Schema instance to use to match short ended elements.
@param {String} html HTML string to find the end tag in.
@param {Number} startIndex Indext to start searching at should be after the start tag.
@return {Number} Index of the end tag.