example/public/ueditor/third-party/SyntaxHighlighter/shCore.js
function(regexList, code)
        {
            var result = [];

            if (regexList != null)
                for (var i = 0; i < regexList.length; i++)
                    // BUG: length returns len+1 for array if methods added to prototype chain (oising@gmail.com)
                    if (typeof (regexList[i]) == "object")
                        result = result.concat(getMatches(code, regexList[i]));

            // sort and remove nested the matches
            return this.removeNestedMatches(result.sort(matchesSortCallback));
        }
function(regexList, code)
        {
            var result = [];

            if (regexList != null)
                for (var i = 0; i < regexList.length; i++)
                    // BUG: length returns len+1 for array if methods added to prototype chain (oising@gmail.com)
                    if (typeof (regexList[i]) == "object")
                        result = result.concat(getMatches(code, regexList[i]));

            // sort and remove nested the matches
            return this.removeNestedMatches(result.sort(matchesSortCallback));
        }
function ( regexList , code ) { var result = [ ] ; if ( regexList != null ) for ( var i = 0 ; i < regexList . length ; i ++ ) // BUG: length returns len+1 for array if methods added to prototype chain (oising@gmail.com) if ( typeof ( regexList [ i ] ) == "object" ) result = result . concat ( getMatches ( code , regexList [ i ] ) ) ; // sort and remove nested the matches return this . removeNestedMatches ( result . sort ( matchesSortCallback ) ) ; }
Applies all regular expression to the code and stores all found
matches in the `this.matches` array.
@param {Array} regexList		List of regular expressions.
@param {String} code			Source code.
@return {Array}				Returns list of matches.
Applies all regular expression to the code and stores all found matches in the this . matches array .