How i can replace any character except 0-9 a-z and and array of some characters with '' (nothing).
My code is look like this
Var pCharArray = ['l', 'o', 'c'];//local characters
Var stringOrginal = 'Some Text';
stringOrginal.replace(/(^[0-9][a-z]pCharArray)/g, '');
Every character that is not 0-9 AND not a-z AND not in pCharArray, should be removed.
a-z. This demo change the example a bit to show it works.pCharArrayevery going to have nona-zcharacters? ...like @gdoron said...