src/query.js
function(key, regex, modifiers) {
        this._addCondition(key, '$regex', regex);
        if (!modifiers) {
          modifiers = '';
        }
        // Javascript regex options support mig as inline options but store them
        // as properties of the object. We support mi & should migrate them to
        // modifiers
        if (regex.ignoreCase) {
          modifiers += 'i';
        }
        if (regex.multiline) {
          modifiers += 'm';
        }

        if (modifiers && modifiers.length) {
          this._addCondition(key, '$options', modifiers);
        }
        return this;
      }
function(key, regex, modifiers) {
        this._addCondition(key, '$regex', regex);
        if (!modifiers) {
          modifiers = '';
        }
        // Javascript regex options support mig as inline options but store them
        // as properties of the object. We support mi & should migrate them to
        // modifiers
        if (regex.ignoreCase) {
          modifiers += 'i';
        }
        if (regex.multiline) {
          modifiers += 'm';
        }

        if (modifiers && modifiers.length) {
          this._addCondition(key, '$options', modifiers);
        }
        return this;
      }
function ( key , regex , modifiers ) { this . _addCondition ( key , '$regex' , regex ) ; if ( ! modifiers ) { modifiers = '' ; } // Javascript regex options support mig as inline options but store them // as properties of the object. We support mi & should migrate them to // modifiers if ( regex . ignoreCase ) { modifiers += 'i' ; } if ( regex . multiline ) { modifiers += 'm' ; } if ( modifiers && modifiers . length ) { this . _addCondition ( key , '$options' , modifiers ) ; } return this ; }
Add a regular expression constraint for finding string values that match
the provided regular expression.
This may be slow for large datasets.
@param {String} key The key that the string to match is stored in.
@param {RegExp} regex The regular expression pattern to match.
@return {AV.Query} Returns the query, so you can chain this call.
Add a regular expression constraint for finding string values that match the provided regular expression . This may be slow for large datasets .