Works in IE and Chrome. Can't find any help on Google. Basically, it's just checking the extension of the file selected in a FileUpload control.
Here's the code:
<asp:FileUpload ID="FileUpload1" runat="server" Width="450" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Invalid file type."
ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf|.txt|.doc|.csv|.xls|.xlsx)$"
ControlToValidate="FileUpload1" Display="Dynamic">
</asp:RegularExpressionValidator>