src/aria/utils/HashManager.js
function (arg) {
            var specialCharRegExp = /([\^\$\.\*\+\?\=\!\:\|\\\/\(\)\[\]\{\}]){1,1}/g;
            var regexpStringArray = [];
            for (var i = 0, len = arg.length; i < len; i++) {
                regexpStringArray.push(arg[i].replace(specialCharRegExp, "\\$1"));
            }
            if (regexpStringArray.length === 0) {
                return null;
            } else {
                return new RegExp(regexpStringArray.join("|"));
            }
        }
function (arg) {
            var specialCharRegExp = /([\^\$\.\*\+\?\=\!\:\|\\\/\(\)\[\]\{\}]){1,1}/g;
            var regexpStringArray = [];
            for (var i = 0, len = arg.length; i < len; i++) {
                regexpStringArray.push(arg[i].replace(specialCharRegExp, "\\$1"));
            }
            if (regexpStringArray.length === 0) {
                return null;
            } else {
                return new RegExp(regexpStringArray.join("|"));
            }
        }
function ( arg ) { var specialCharRegExp = / ([\^\$\.\*\+\?\=\!\:\|\\\/\(\)\[\]\{\}]){1,1} / g ; var regexpStringArray = [ ] ; for ( var i = 0 , len = arg . length ; i < len ; i ++ ) { regexpStringArray . push ( arg [ i ] . replace ( specialCharRegExp , "\\$1" ) ) ; } if ( regexpStringArray . length === 0 ) { return null ; } else { return new RegExp ( regexpStringArray . join ( "|" ) ) ; } }
Return the regular expression needed to match one occurrence of any of the strings specified in the entries
of the array
@param {Array} arg Array of alternatives
@return {RegExp}
Return the regular expression needed to match one occurrence of any of the strings specified in the entries of the array