Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split string based on length in javascript

"123456789".match(/.{1,2}/g);
// Results in:
["12", "34", "56", "78", "9"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #string #based #length #javascript
ADD COMMENT
Topic
Name
5+3 =