Fix escaping of regular expressions in VC builder

Change-Id: I172c83fcb7ebb0943b23106891c57aeadca0a1f8
diff --git a/dev/js/src/util.js b/dev/js/src/util.js
index 00a2bd5..d803a9d 100644
--- a/dev/js/src/util.js
+++ b/dev/js/src/util.js
@@ -14,6 +14,11 @@
   return this.replace(_quoteRE, '\\$1');
 };
 
+var _escapeRE = new RegExp("([\/\\\\])", 'g');
+String.prototype.escapeRegex = function () {
+  return this.replace(_escapeRE, '\\$1');
+};
+
 // Add toggleClass method similar to jquery
 HTMLElement.prototype.toggleClass = function (c1, c2) {
   var cl = this.classList;