How do you find the first 4 characters/letters in this string using regexp? In this case , how to find SPAS?
var str = "SPASIAL1-40";
i'm confused whether to use /\w/g
or /\d{4}/g
How do you find the first 4 characters/letters in this string using regexp? In this case , how to find SPAS?
var str = "SPASIAL1-40";
i'm confused whether to use /\w/g
or /\d{4}/g