.htaccess after moving WordPress installation

Please do me a solid by helping me with this:

1)
old WordPress: example.com/blog/2012/03/03/slug/
new WordPress: example.com/2012/03/03/slug/
(take out /blog/ and replace with /)

I am changing all the database references to /blog/ but I'm blanking out on how to make all my past links in the Internet not get 404's. I believe the best way is to use .htaccess.

2)
old WordPress: before.com/blog/2012/03/03/slug/
new WordPress: after.com/2012/03/03/slug/
(changed domain names and replace /blog/ with /)

This might help too: http://htaccess.madewithlove.be/
you can put your rules in there and test what the outcome will be

I really appreciate it.