Hi: warrenlyle;
This is basically the same solution I gave you yesterday but will match any number of digits for the four sets of numbers.
using System.Text.RegularExpress
using System.IO;
String pattern = @"(?i)MediaBox\[\d+\s+\d+\
String fileName = @"C:\Temp\TestData.txt";
StreamReader sr = new StreamReader(fileName);
String input = sr.ReadToEnd();
sr.Close();
MatchCollection mc = Regex.Matches(input, pattern);
foreach (Match m in mc)
{
Console.WriteLine(m.Value)
}
Fernando
Main Topics
Browse All Topics





by: warrenlylePosted on 2007-04-24 at 08:43:23ID: 18966754
found it!
s\d+\]
(?i)MediaBox\[\d\s\d\s\d+\