using .net 2.0.50110
String line;
RegexOptions options = ((RegexOptions. IgnorePatternWh itespace |
RegexOptions.Si ngleline)| RegexOptions.Ig noreCase);
Regex headerRE = new
Regex(@"\\d{5,5 }(?<an8>\\d{5,5 })\\s(?<bu>\\d{ 2,2}).(?<mcu>\\ d{3,3})",option s);
Match headerM = headerRE.Match( line);
while(headerM.S uccess)
......
line = aaa,bbbbb 0001047611 19-372 MFG10
it should match and pull the middle numbers...
i ran it in The Regulator and its ok and i ran it at
http://www.regexlib.com/RETester.aspx and the regular expression is ok.
i step through the code and the line is ok.. so i have no idea why
headerM.Success is always false!
also line comes from a file read from StreamReader.Re adLine
Thanks
Justin
String line;
RegexOptions options = ((RegexOptions. IgnorePatternWh itespace |
RegexOptions.Si ngleline)| RegexOptions.Ig noreCase);
Regex headerRE = new
Regex(@"\\d{5,5 }(?<an8>\\d{5,5 })\\s(?<bu>\\d{ 2,2}).(?<mcu>\\ d{3,3})",option s);
Match headerM = headerRE.Match( line);
while(headerM.S uccess)
......
line = aaa,bbbbb 0001047611 19-372 MFG10
it should match and pull the middle numbers...
i ran it in The Regulator and its ok and i ran it at
http://www.regexlib.com/RETester.aspx and the regular expression is ok.
i step through the code and the line is ok.. so i have no idea why
headerM.Success is always false!
also line comes from a file read from StreamReader.Re adLine
Thanks
Justin
Comment