I believe it is language specific. What are you using? PHP, ASP, ASP.NET, Javascript?

This site lets you enter an expression, set flags (e.g. case insensitivity), and when you click submit, it tests the expression with the option to display the proper syntax for selected languages.

http://www.myregextester.com/