javascript - How to separate String of times into parts (array)? -


i have string

"09:2510:3012:0514:4517:2520:0521:0522:4501:30" 

i want can this:

enter image description here

i try use , still can figure out.

function() {     for(var = 0; < movietime.length; i++){         console.log(movietime[0]);         // don't know how complete.      }; 

please show me tips , appreciated.

thanks in advance.

with little regex, can separate them. assuming have standard format of string.

var str = "09:2510:3012:0514:4517:2520:0521:0522:4501:30";  var times = str.match(/.{1,5}/g)  console.log(times);


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -