http://msdn.microsoft.com/library/en-us/dnnetsec/html/THCMCh10.asp?frame=true
has some great regex examples about 1/2 down the page.
oh, and the CAS ASP.NET pages are essential for anyone deploying ASP.NET files on a web server which has its webroot on a network share, or any webserver to which you do not have admin rights.