Good morning guys
Is there a good way to use regular expression in C# in order to find all filenames and their paths within a string
variable?
For example, if you have this string:
string s = @"Hello John
these are the files you have to send us today: <file>C:\Development\Projects 2010\Accounting\file20101130.csv</file>, <file>C:\Development\Projects 2010\Accounting\orders20101130.docx</file>
also we would like you to send <file>C:\Development\Projects 2010\Accounting\customersupdated.xls</file>
thank you";
The result would be:
C:\Development\Projects 2010\Accounting\file20101130.csv
C:\Development\Projects 2010\Accounting\orders20101130.docx
C:\Development\Projects 2010\Accounting\customersupdated.xls
EDITED: Considering what told @Jim, I edited the string adding tags in order to make it easier to extract needed file names from string!