Recently I was looking for a regular expression to validate a file path and extension. I found several of them on Google but none of them fit my requirement. So I decided to put together a version that suits my need. Here is the Regular Expression to validate the file path and extension and it compatible with JavaScript and ASP.NET.