"010110111011110" =~ /1+/g; # Global means search for match from the # beginning to the end of string. # Last match should be "1111" at positions # from somewhere >10 and >10+4, # but print "@LAST_MATCH_START|@LAST_MATCH_END\n"; # don't say so. # It prints me "|\n"