Msg#: 3602229 posted 6:23 pm on Mar 16, 2008 (gmt 0)
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!
Msg#: 3602229 posted 11:40 pm on Mar 16, 2008 (gmt 0)
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.