static/ext/src/util/AbstractMixedCollection.js
function(value, anyMatch, caseSensitive, exactMatch) {
        if (!value.exec) { // not a regex
            var er = Ext.String.escapeRegex;
            value = String(value);

            if (anyMatch === true) {
                value = er(value);
            } else {
                value = '^' + er(value);
                if (exactMatch === true) {
                    value += '$';
                }
            }
            value = new RegExp(value, caseSensitive ? '' : 'i');
        }
        return value;
    }
function(value, anyMatch, caseSensitive, exactMatch) {
        if (!value.exec) { // not a regex
            var er = Ext.String.escapeRegex;
            value = String(value);

            if (anyMatch === true) {
                value = er(value);
            } else {
                value = '^' + er(value);
                if (exactMatch === true) {
                    value += '$';
                }
            }
            value = new RegExp(value, caseSensitive ? '' : 'i');
        }
        return value;
    }
function ( value , anyMatch , caseSensitive , exactMatch ) { if ( ! value . exec ) { // not a regex var er = Ext . String . escapeRegex ; value = String ( value ) ; if ( anyMatch === true ) { value = er ( value ) ; } else { value = '^' + er ( value ) ; if ( exactMatch === true ) { value += '$' ; } } value = new RegExp ( value , caseSensitive ? '' : 'i' ) ; } return value ; }
Returns a regular expression based on the given value and matching options. This is used internally for finding and filtering,
and by Ext.data.Store#filter
@private
@param {String} value The value to create the regex for. This is escaped using Ext.escapeRe
@param {Boolean} anyMatch True to allow any match - no regex start/end line anchors will be added. Defaults to false
@param {Boolean} caseSensitive True to make the regex case sensitive (adds 'i' switch to regex). Defaults to false.
@param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true.
@since Ext 3
Returns a regular expression based on the given value and matching options . This is used internally for finding and filtering and by Ext . data . Store#filter