api/extjs/browser-part/e-br-search.js
function parseSearchString(str) {

    str = tia.cU.replaceXTypesInTeq(str);

    var re = /&(\w|\d|_|-)+/g;

    var searchData = [];
    var prevLastIndex = 0;
    var query;

    while (true) {
      var reResult = re.exec(str);

      if (reResult === null) {
        // Only query string.
        query = str.slice(prevLastIndex).trim();
        if (query) {
          searchData.push({
            query: query,
          });
        }
        return searchData;
      }

      query = str.slice(prevLastIndex, reResult.index).trim();
      var reference = str.slice(reResult.index + 1, re.lastIndex).trim();
      prevLastIndex = re.lastIndex;

      if (query) {
        searchData.push({
          query: query,
        });
      }

      searchData.push({
        reference: reference,
      });

    }
  }
function parseSearchString(str) {

    str = tia.cU.replaceXTypesInTeq(str);

    var re = /&(\w|\d|_|-)+/g;

    var searchData = [];
    var prevLastIndex = 0;
    var query;

    while (true) {
      var reResult = re.exec(str);

      if (reResult === null) {
        // Only query string.
        query = str.slice(prevLastIndex).trim();
        if (query) {
          searchData.push({
            query: query,
          });
        }
        return searchData;
      }

      query = str.slice(prevLastIndex, reResult.index).trim();
      var reference = str.slice(reResult.index + 1, re.lastIndex).trim();
      prevLastIndex = re.lastIndex;

      if (query) {
        searchData.push({
          query: query,
        });
      }

      searchData.push({
        reference: reference,
      });

    }
  }
function parseSearchString ( str ) { str = tia . cU . replaceXTypesInTeq ( str ) ; var re = / &(\w|\d|_|-)+ / g ; var searchData = [ ] ; var prevLastIndex = 0 ; var query ; while ( true ) { var reResult = re . exec ( str ) ; if ( reResult === null ) { // Only query string. query = str . slice ( prevLastIndex ) . trim ( ) ; if ( query ) { searchData . push ( { query : query , } ) ; } return searchData ; } query = str . slice ( prevLastIndex , reResult . index ) . trim ( ) ; var reference = str . slice ( reResult . index + 1 , re . lastIndex ) . trim ( ) ; prevLastIndex = re . lastIndex ; if ( query ) { searchData . push ( { query : query , } ) ; } searchData . push ( { reference : reference , } ) ; } }
Parses search string into tokens with query and reference.
@param str
@return {Array}
Parses search string into tokens with query and reference .