I am writing js code to get array of elements after splitting using regular expression.
var data = "ABCXYZ88";
var regexp = "([A-Z]{3})([A-Z]{3}d{2})";
console.log(data.split(regexp));
It returns [ 'ABCXYZ88' ]
But I am expecting something like ['ABC','XYZ','88']
Any thoughts?
via Dinesh
No comments:
Post a Comment