([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xls
....would match the complete path, as would :
([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xlsx
I'm not sure if they can be combined like this :
([a-zA-Z]:(\\w+)*\\[a-zA-Z0_9]+)?.xls|.xlsx
^^^that's a pipe [ | ]^^^
....to catch them both with the same expression.
Maybe someone here can confirm ?
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
"AVL" <AV*@discussions.microsoft.comwrote in message news:63**********************************@microsof t.com...
hi,
i'm a new bie to regular expressions..
i'm trying to see if a string ends with teh below
pattern \filename.xls or \filename.xlsx...
I've used the @"\\[\w|\W]+\.xls" pattern but's it's
matching hte below string
d:\sample\.xls....
can someone help me out with teh correct pattern