I have an expression and I want to get only the style number from it. My code looks like this:
output: 47968202593
desired output: 479682
Code:
var expression = 'Style No : 479682 Color : Neutral Theme : Pearl Size : 0.25"H, 9" + 3" L One Side Only Lead and Nickel Compliant Freshwater Pearl Disc Beaded Anklet';
var regex4 = /[^\d{6}]/g;
var sku = expression.replace(regex4, '');
console.log(sku);
desired output: 479682
Last edited: