Remove all special characters with RegExp

I would like a RegExp that will remove all special characters from a string. I am trying something like this but it doesn’t work in IE7, though it works in Firefox. var specialChars = “!@#$^&%*()+=-[]\/{}|:<>?,.”; for (var i = 0; i < specialChars.length; i++) { stringToReplace = stringToReplace.replace(new RegExp(“\\” + specialChars[i], “gi”), “”); } A … Read more

Meaning of $? (dollar question mark) in shell scripts

This is the exit status of the last executed command. For example the command true always returns a status of 0 and false always returns a status of 1: true echo $? # echoes 0 false echo $? # echoes 1 From the manual: (acessible by calling man bash in your shell) $?       Expands to the exit status of the most recently executed foreground … Read more