function processValue(regex, processor, nextProcessor, valueText)
        {
            var container = createDocumentFragment();

            var items = valueText.replace(regex, "\0$1\0").split("\0");
            for (var i = 0; i < items.length; ++i) {
                if ((i % 2) === 0) {
                    if (nextProcessor)
                        container.appendChild(nextProcessor(items[i]));
                    else
                        container.createTextChild(items[i]);
                } else {
                    var processedNode = processor(items[i]);
                    if (processedNode)
                        container.appendChild(processedNode);
                }
            }

            return container;
        }
@param {!RegExp} regex
@param {function(string):!Node} processor
@param {?function(string):!Node} nextProcessor
@param {string} valueText
@return {!DocumentFragment}