Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split a string four characters in js

console.log("abcdefghmno".match(/.{1,4}/g)); // ["abc", "d"]
 Run code snippetHide results
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #string #characters #js
ADD COMMENT
Topic
Name
7+7 =