Lines of at least 80 characters


using System;
using System.Text.RegularExpressions;

class Program
{
    static void Main(string[] args)
    {

         string r = @"(?m)^.{80,}(?=\r?$)"; 
    
         string fifty = new string ('x', 50); 
         string eighty = new string ('x', 80); 
    
         string text = eighty + "\r\n" + fifty + "\r\n" + eighty; 
    
         Console.WriteLine (Regex.Matches (text, r).Count);             // 2 

    }
}

The output:


2
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.