nodejs get values before character code example
Example: js get string before character
var str = "JavaScript is the programming language of the Web.";
// this will return string before the word programming
var result = str.split('programming')[0];
// result : "JavaScript is the ";