No need of regex here. Just split it using -
and access the array element with index=1.
var str = "RED-MPWMC-40486655646-024";
console.log(str.split("-")[1]);
solved RegEx string – code with JavaScript [closed]
No need of regex here. Just split it using -
and access the array element with index=1.
var str = "RED-MPWMC-40486655646-024";
console.log(str.split("-")[1]);
solved RegEx string – code with JavaScript [closed]