This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in the regex, the carrot(^) negates the match, so if the stringToReplace contains something that is not a-z or 0-9 it will be replaced | |
| // In this case the desired string will only be alpha numeric characters, stripping out spaces and symbols | |
| // Help from: http://stackoverflow.com/questions/4374822/javascript-regexp-remove-all-special-characters | |
| var desired = stringToReplace.replace(/[^a-zA-Z0-9]/gi, '') |