Node.js examples for String:Trim
Trim string from both side using regex
String.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); }