Created
November 2, 2012 11:43
-
-
Save fatihacet/4000605 to your computer and use it in GitHub Desktop.
Divide string into parts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = "123456789012341".match(/.{3,4}/g); | |
console.log(arr); // ["1234", "5678", "9012", "341"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment