Removing comma from number search

When a user performs a search on a number field with a number that contains a comma, the search breaks. How can the comma be removed before the search takes place? stringReplace and stringToNumber do not appear to work for a comma.