$Test_String = ; if($Test_String =~ /$Regex_Pattern/){ print "true"; } else { print "false"; } #### 1110110001 => 00111, 10101 7 21 3 * 7 = 21, accept! #### use bigint; sub check { my ($bin, $three) = ('0b') x 2; my $s = $_; while ($s) { $three .= chop $s; $bin .= chop $s; } return oct $three == 3 * oct $bin } $Regex_Pattern = qr/(?{ check() })/; #### (?(condition)yes-pattern|no-pattern) #### $Regex_Pattern = qr/^(?(?{ check() }) ^ | (*FAIL) )/x; #### '^(?(?{c()})^|(*F))' #### ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,