Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript split

var names = 'Harry ;Fred Barney; Helen Rigby ; Bill Abel ;Chris Hand ';

console.log(names);

var re = /s*(?:;|$)s*/;
var nameList = names.split(re);

console.log(nameList);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #split
ADD COMMENT
Topic
Name
1+9 =