Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find the words separated by whitespace in a string javascript

// find words separated by whitespace in a string js

var text = "hoi how     are          you";
var arr = text.split(/s+/)
 
PREVIOUS NEXT
Tagged: #find #words #separated #whitespace #string #javascript
ADD COMMENT
Topic
Name
1+2 =