private void button1_Click(object sender, EventArgs e)
{
string value = textBox1.Text;
string[] lines = value.Split(Environment.NewLine.ToCharArray());
foreach (string l in lines)
if (l.IndexOf("Processing")==0)
{
textBox4.Text = textBox4.Text + l + Environment.NewLine;
}
MatchCollection matches2 = Regex.Matches(value, "\"([^\"]*)\"");
foreach (Match match2 in matches2)
{
foreach (Capture capture2 in match2.Captures)
{
textBox4.Text = textBox4.Text + Environment.NewLine + capture2.Value;
}
}
}
我的输入是:-
Processing \\Users\\bhargava\\Desktop\New.txt
<"dfgsgfsgfsgfsgfsgfsgfs">
Processing \\Users\\bhargava\\Desktop\\New.txt
<"dfgsgfsgfsgfsgfsgfsgfs">
Processing \\Users\\bhargava\\Desktop\New.txt
Processing \\Users\\bhargava\\Desktop\\New.txt
我需要输出:-
Processing \\Users\\bhargava\\Desktop\New.txt
"dfgsgfsgfsgfsgfsgfsgfs"
Processing \\Users\\bhargava\\Desktop\\New.txt
"dfgsgfsgfsgfsgfsgfsgfs"
Processing \\Users\\bhargava\\Desktop\New.txt
Processing \\Users\\bhargava\\Desktop\\New.txt
我正进入(状态 :-
Processing \\Users\\bhargava\\Desktop\New.txt
Processing \\Users\\bhargava\\Desktop\\New.txt
Processing \\Users\\bhargava\\Desktop\New.txt
Processing \\Users\\bhargava\\Desktop\\New.txt
"dfgsgfsgfsgfsgfsgfsgfs"
"dfgsgfsgfsgfsgfsgfsgfs"
请帮帮我!