To remove/replace anything in a string to a certain point, use the following regex:
var alphabet = "ABCDEFGHIJKLMNOPQRSTUVEXYZ";
var replaced = alphabet.replace(/^.+M/,'');
This will replace everything before M and including M.
Today I Learned
To remove/replace anything in a string to a certain point, use the following regex:
var alphabet = "ABCDEFGHIJKLMNOPQRSTUVEXYZ";
var replaced = alphabet.replace(/^.+M/,'');
This will replace everything before M and including M.