Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ArgumentOutOfRangeException
Message
From
08/03/2010 09:21:12
 
 
To
08/03/2010 07:43:04
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01453133
Message ID:
01453160
Views:
36
>You need to test for m.Success
>
>
>			string filepath = @"\folder\aaa.bb";
>			//string filepath = @"\aaa.bb"; // fails
>
>			string pat = @"\\(?:.+)\\(.+)\.(.+)";
>
>
>			
>
>			var m = Regex.Match(filepath, pat);
>
>			if (m.Success)
>			{
>				Console.WriteLine("{0}", m.Groups[1].Captures[0].ToString());
>				Console.WriteLine("{0}", m.Groups[2].Captures[0].ToString());
>			}
>			else
>				Console.WriteLine("No match");
>
>
>			Console.ReadLine();
OK, thanks everyone for their input.

m.Success is false.

The filepath value is just the filename (AALogo.jpg) not the entire file name and folder, even though what gets displayed in the text box is the full path. Why would this be so? And if it is, why do I need to try to strip out just the file name and how would it know the full path to the file in order to upload it?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform