rem: rex = RegExp(substring.replace(/([^* \w])/g, "\\$1").replace(/[*]/g, ".*"), "i"); 
add: rex = RegExp(substring.replace(/([^* \w])/g, "\\$1").replace(/^\*+/, "") .replace(/\*+/g, ".*"), "i"); 
context: function FilterPrefs(){  var substring = document.getElementById("textbox").value;  var rex;  // Check for "/regex/[i]"  if (substring.charAt(0) == '/') {    var r = substring.match(/^\/(.*)\/(i?)$/);    try {      rex = RegExp(r[1], r[2]);    }    catch (e) {      return; // Do nothing on incomplete or bad RegExp    }  }  var prefCol = view.selection.currentIndex < 0 ? null : gPrefView[view.selection.currentIndex].prefCol;  var oldlen = gPrefView.length;  gPrefView = gPrefArray;  if (substring) {    gPrefView = [];    if (!rex)      rex = RegExp(substring.replace(/([^* \w])/g, "\\$1").replace(/[*]/g, ".*"), "i");    for (var i = 0; i < gPrefArray.length; ++i)      if (rex.test(gPrefArray[i].prefCol + ";" + gPrefArray[i].valueCol))        gPrefView.push(gPrefArray[i]);    if (gFastIndex < gPrefArray.length)      gPrefView.sort(gSortFunction);  }  view.treebox.invalidate();  view.treebox.rowCountChanged(oldlen, gPrefView.length - oldlen);  gotoPref(prefCol);  document.getElementById("button").disabled = !substring;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/21cec864cac0277d26f8d0a8733c4e74eef16499/config.js/buggy/toolkit/components/viewconfig/content/config.js