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?
patternandregex? Because"123:AB.CD.EF.GH.IJ".match(/^[0-9]*(?=\:)/)works.'123:AB.CD.EF.GH.IJ'.match(/^[0-9]*(?=\:)/)works just fine for me. Your problem must be elsewhere.^to a\band see if that helps.