Let's say I have these two strings: "5/15/1983" and "1983.05.15". Assume that all characters in the string will be numeric, except a "separator" character that can appear anywhere in the string. There will be only one separator character; all instances of any given non-numeric character in the string will be identical.
How can I use regex to extract this character? Is there a more efficient way than the one below?
"05-15-1983".replace(/\d/g, "")[0];
Thanks!