I have an input box where a user can imput data like this:
528|438 530|438 528|439 532|439 533|438 534|438
Then I have the following RegeX, wich should put all matches in an array:
$("#offimportklik").click(function(){
var teimporterendata = $("#importoffkader").val();
var regex = /\d{1,3}\|\d{1,3}/;
matches = teimporterendata.match(regex)
alert(matches);
})
But I only get one match every time. How do I put ALL matches in an array?