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)$
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.