I am trying to remove the dollar format from the string \'$1,109,889.23\'. I tried using a regular expression with:
\"[^\\\\d]\"
but then I ge
I'm not sure I understand exactly what you want, but it seems that in your example you would want to end up with "1,109,889.23". If this is the case, why don't you simply select use [\d,.\x20]+
(note the period is not escaped, as it is in character set, and note the \x20 to select spaces if they use that instead of commas) to select just the number. If you want to select everything that is NOT part of the number, as your example indicates, then you would just search for [^\d,.\x20]
. This will work for any currency format, not just ones that use the dollar sign. It will also allow multiple types of punctuation, such as allowing spaces instead of commas to separate multiple numbers. However, I agree with Tim Pietzcker that a regular expression might not be the right tool for the job.