Forum Moderators: open
replace(/x/ig, 'X') will find all occurrences of 'x' or 'X' and replace them with 'X', and
replace(/x/ig, 'x') will find all occurrences of 'x' or 'X' and replace them with 'x',
but the toUpperCase() and toLowerCase() methods are the preferred way to shift case with an arbitrary string.