Below are the codes of two classes on which I am getting this error.
Please can someone help me correct this error?
The error reads like--->
the best overload method match for System.Text.RegularExpressions.Regex.Match has some invalid arguments
I am getting this error at str2 in the below 2 codes:
public int GetLength(string path)
{
string output = this.GetOutput(path);
string str2 = "";
int num = 0;
if ((output == "") && (output.Contains("Invalid data found when processing input") || output.Contains("could not find codec parameters")))
{
return 0;
}
string str3 = path;
try
{
str2 = Regex.Match(output, @"(?:Duration\:)(.*?)(?:,)", 0x10).Groups[1].Value.Trim();
}
catch (Exception)
{
str2 = "";
}
if (str2 != "")
{
try
{
num = int.Parse(str2.Split(new char[] { ':' })[0]) * 0xe10;
num += int.Parse(str2.Split(new char[] { ':' })[1]) * 60;
num += (int)double.Parse(str2.Split(new char[] { ':' })[2]);
}
catch (Exception)
{
}
}
return num;
}
public int GetLength(string path)
{
string input = path;
string str2 = "";
int num = 0;
if ((input == "") && (input.Contains("Invalid data found when processing input") || input.Contains("could not find codec parameters")))
{
return 0;
}
string str3 = path;
try
{
str2 = Regex.Match(input, @"(?:Duration\:)(.*?)(?:,)", 0x10).Groups[1].Value.Trim();
}
catch (Exception)
{
str2 = "";
}
if (str2 != "")
{
try
{
num = int.Parse(str2.Split(new char[] { ':' })[0]) * 0xe10;
num += int.Parse(str2.Split(new char[] { ':' })[1]) * 60;
num += (int)double.Parse(str2.Split(new char[] { ':' })[2]);
}
catch (Exception)
{
}
}
return num;
}
I am getting this error at str in the below code:
public void GetSize(string result)
{
string str = "";
try
{
string input = result;
if (input.Contains("Video:"))
{
input = input.Substring(input.IndexOf("Video:"));
}
str = Regex.Match(input, @"\d+x\d+", 0x10).Groups[0].Value;
this.width = double.Parse(str.Split(new char[] { ':' })[0]);
this.height = double.Parse(str.Split(new char[] { ':' })[1]);
}
catch (Exception)
{
}
}
Any help would be greatly appreciated.


Sign In
Create Account

Back to top









