Page 1 of 1

Finding a regular expression in a string, then extracting it

Posted: Wed Oct 07, 2009 12:13 pm
by hame22
Hi all

I have a number of strings and within these strings I want to extract any values that can be classed as money. The values will generally speaking be written like £750, £100000, £100,000, £150,755. Sometimes they may have full stops or other characters appended on their ends.

I want to be able to search for these money values then when I find them fully extract them so I can remove any commas and ensure they are formatted the same.

I am having trouble finding and extracting the values, what is the best route is this something I should use a reg expression for?

Any help will be mostly appricated

Thanks in advance!