Clustering or grouping : Group « Regular Expression « Perl






Clustering or grouping

   

while(<DATA>){
    print if /\s(12){3}$/;  # match exactly 3 consecutive occurrences of 12 at the end of the line
}
__DATA__
    Mary
    Betty Boop
    Mark 123
    123 123 123

   
    
    
  








Related examples in the same category