Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ArgumentOutOfRangeException
Message
De
08/03/2010 09:21:12
 
 
À
08/03/2010 07:43:04
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01453133
Message ID:
01453160
Vues:
37
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform