How would I construct a regular expression to yield the index of an alphanumeric character that is preceded by a non-alphanumeric character?
Examples:
- (Special Edition) --> should match only 'S' and yield an index of 1
- Special Edition --> should not match at all
- "{(Special Edition)}" --> should match 'S' and yield an index of 3
I know that JavaScript can provide the index of the match like so:
const index = string.match(/regular_expression/)?.index || 0;
I cannot figure out how to construct the an expression that does what I have described.