Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript explode space

var str   = "my car is red";
var stringArray = str.split(/(s+)/);

console.log(stringArray); // ["my", " ", "car", " ", "is", " ", "red"] 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #explode #space
ADD COMMENT
Topic
Name
8+7 =