Reading a recent post in dotNetZone.gr I decided to implement as a proof-of-concept an algorithm using regular expressions to convert a decimal numeral representing an amount of money, to a verbal from in Greek text.
So to make it more obvious the problem was to convert 1,234,567.89 Euros to the string “One Million, Two Hundred Thirty Four, Five Hundred Sixtyseven Euros and Eightynine Cents” (only that the text should be in Greek and not English as I typed here to make the concept clear for everyone).
The algorithm I came up with is not the best that I could do but is enough as a proof of concept. Do not be alarmed if it seems too long at first glance. It’s just the code comments that make it so long.
So to find the algorithm:
- Either read it online in my relevant blog article in dotNetZone.gr here. Apart from code comments, all other text in the refered article is in Greek but since you are reading this you do not realy need to be able to understand anything else
- or download GreekEuroVerbalizer.zip (220,72 KB) which contains a VS.NET 2003 solution with a demo windows application that tests the algorithm.
- You can also view online a rough documentation created with nDoc from my source comments here.








Comment Form