string s = textBox1.Text;
string[] lines = s.Split(Environment.NewLine.ToCharArray());
foreach (string l in lines)
{
if (Regex.IsMatch(lines.(Here when i select .ToString() i get no o/p), pattern))
{
textBox3.Text = textBox3.Text + l + Environment.NewLine+;
}
}
例如,如果输入是:
Processing \\Users\\bhargava\\Desktop\New.txt
Processing \\Users\\bhargava\\Desktop\\New2.txt
<get process by id>
Processing \\Users\\bhargava\\Desktop\New3.txt
<get element by id>
Processing \\Users\\bhargava\\Desktop\\New4.txt
输出是:
Processing \\Users\\bhargava\\Desktop\New.txt
Processing \\Users\\bhargava\\Desktop\\New2.txt
Processing \\Users\\bhargava\\Desktop\New3.txt
Processing \\Users\\bhargava\\Desktop\\New4.txt