could anyone tell me how to do this, in the format of replace(x,x)? i have a regexp cheat sheet that has the posix notations as [:upper:] and [:lower:] but firebug throws an error when i try to use this.
id imagine this is quite simple, just cant track it down. thanks!
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.