Pls everyone, i need help with two regula expressions

One to accept only file word and pdf file and the other to accept only images(.jg|.bmp|.png|.gif)
Thanks

Hi!

Do you want to "open" only word, pdf or image files ??? for that you should use "OpenFileDialog" with "Filter" property to:

http://msdn.microsoft.com/en-us/library/microsoft.win32.filedialog.filter.aspx

Patterns:

Here is the combine "pattern":

(\.pdf|\.doc|\.docx|\.gif|\.bmp|\.jpg|\.png|\.tiff|\.tif)$

here is the pattern for first condition:

(\.pdf|\.doc|\.docx)$

here is the pattern for second condition:

(\.gif|\.bmp|\.jpg|\.png|\.tiff|\.tif)$