In an application I’m developing, someone thought it would be ok idea to include commas in the values of a csv file. So what I’m trying to do select these values and then strip the commas out of these values. But the Regex I’ve built won’t match to anything.
The Regex pattern is: .*,\'<money>(.+,.+)\',?.*
And the sort of values I’m trying to match would be the 2700, 2650 and 2600 in '2,700','2,650','2,600'.
Thanks for the answer Ryan. I should’ve kept my temper in check a bit more. Though still, commas in a CSV that don’t seperate values?
After asking around the office I got pointed towards a free Regex designer application that I used to build the pattern I needed. The application is Rad Software Regular Expression Designer
Oh and for the answer purposes the pattern I came out with is:
\'(?<money>[0-9,.$]*)\'Edit: Final Andwer
Woah. Completely forgot about this question. I played around with the regex even more and came out with one that would match everything I needed. The regex is:
\'([0-9.$]+(,[0-9.]+)+)\'That regex has been able to match any deciaml string within a double quote that I’ve thrown at it.