There is an excellent site called http://regex101.com that does exactly that, as well. It also provides access to different regex engines, allows you to save and debug your regexes and test strings...very nice.
2.1m questions
2.1m answers
60 comments
57.0k users