Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

can you use javascript split with more than one separator

> var myString="this,is.a_test"
> console.log(myString.split(/[,._]/));
< ["this","is","a","test"]

//This uses a regular expression (contained in /foo/).
//It will match any character included in the [] set.
 
PREVIOUS NEXT
Tagged: #javascript #split #separator
ADD COMMENT
Topic
Name
5+5 =