I am trying to get the number (123) from data written in the format 123:AB.CD.EF.GH.IJ using Javascript.
Currently I have a regular expression /^[0-9]*(?=\:)/ and using
var ABC = pattern.match(regex);
but I keep coming up empty handed. What is wrong with my expression?
Or you could skip regex and use
pattern.split(':')[0].