Fix escaping of regular expressions in VC builder

Change-Id: I172c83fcb7ebb0943b23106891c57aeadca0a1f8
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index b56ba53..6a44fa8 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -567,7 +567,7 @@
         return string + this.value();
         break;
       case "regex":
-        return string + '/' + this.value() + '/';
+        return string + '/' + this.value().escapeRegex() + '/';
         break;
       case "string":
         return string + '"' + this.value().quote() + '"';