[Solved] Regular expression to get value [closed]
It’s hard to say for certain without knowing all the possible options of input strings, but for example if you always just want to get the number that has :: on its left AND :: on its right (1 in your example): var myInput=”LUGG::1::LUGG::5-GBP”; var myNumber = myInput.match(/::(\d+)::/)[1]; alert(myNumber); // alerts 1 solved Regular expression … Read more