How to get specific text from a string using javascript

Ask A Question

Login To post a question

I am trying to get text from an array except year,month,date using javascript.I do not know how do it.

var arr = ["power-still-rate-19.08.22", "main-still-rate-19.08.22", "oil-power-rate-19.08.22","oil-mill-rate-19.7.2"];
var result;
for (var i = 0; i < arr.length; i++) {
  result = arr[i].remove('?????????');

//result should be like = power-still-rate,main-still-rate,oil-power-rate ;

For more info please click here

Have a question or need a custom quote?