The short answer is, it depends. While many lending programs will allow approvals with foreclosures as recent as 3 years ago, they will be looking at your current credit history.
The best place to start is with a pre-approval. I always recommend a local mortgage expert over the big banks (for too many reasons to list).
If the foreclosure was the only issue that is on your credit report, you may very well be in the position to buy.
Best of luck!
Kindred Real Estate