I, also, do not understand the OP, but zeroing in on the "I want only the patterns that has more than 2 consecutive 1's ..." portion as zek152 has, I would code the regex slightly differently (I don't understand the [01]* bits):
>perl -wMstrict -le "my @strings = qw(0110 1 11 01110 001 100 1111 01001110); my @three_or_more = grep { m{ 1{3} }xms } @strings; printf qq{'$_' } for @three_or_more; " '01110' '1111' '01001110'
In reply to Re^2: matching pattern question?
by AnomalousMonk
in thread matching pattern question?
by BhariD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |