109
rated 0 times
[
115]
[
6]
/ answers: 1 / hits: 22593
/ 12 Years ago, fri, march 16, 2012, 12:00:00
I am trying to split following (or similar) string 08-27-2015 07:25:00AM.
Currently I use
var parts = date.split(/[^0-9a-zA-Z]+/g);
Which results in
[02, 27, 2012, 03, 25, 00AM]
The problem is with the 00AM
part. I want it to be separated too. So the perfect result would be:
[02, 27, 2012, 03, 25, 00, AM]
More From » regex