Here's a nice tool that lets you test your regular expression patterns online. You also have a choice between preg (which is perl based) or ereg (POSIX), check it out: http://www.quanetic.com/regex.php
Online Regex Tester
Yep used that before, its is pretty good