I need to remove the "ML
" portion of "ML 11/07
" but I want to keep the numbers as well as the slash.
Here is my current code (Google Apps Script)
var sec=second.replace("[^\\d.]", "");
tss.getRange(counter2, 5).setValue(sec);
I need to remove the "ML
" portion of "ML 11/07
" but I want to keep the numbers as well as the slash.
Here is my current code (Google Apps Script)
var sec=second.replace("[^\\d.]", "");
tss.getRange(counter2, 5).setValue(sec);
You can use RegExp
/[a-z]/ig
, .trim()
var sec = second.replace(/[a-z]/ig, "").trim();
you can do this.
var string = "ML 11/07"
var result = string.split(" ");
console.log(result[1]);