in reply to Re: Regex matching a string beginning with "root: " but not containing another string
in thread Regex matching a string beginning with "root: " but not containing another string
sub not_string_regex { my $str = shift; my $reg; for(0..length($str)-1) { my $let = substr($str,$_,1); $reg .= '($|[^'.$let.']|'.$let; } substr($reg, -2) = ''; $reg .= ')' x length($str); }
|
|---|