ES6 RegExp split() ES6 RegExp search() ES6 RegExp toString() ES6 RegExp split() var names = 'Monday;Tuesday;Wednesday'; console.log(names); var re = /\s*;\s*/; var nameList = names.split(re); console.log(nameList); ES6 RegExp search() ES6 RegExp toString()