Answers for "split string to an array"

4

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);
Posted by: Guest on April-25-2020
0

split string into array java

String[] array = values.split("\\|", -1);
Posted by: Guest on November-03-2020
1

javascript split

var arr = ['hey', 'nay', 'wey'];
var let = arr.split(' ');
console.log(let);
Posted by: Guest on September-20-2020

Code answers related to "split string to an array"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language