Dan wrote: > Hi > > I'm not entirely sure if this is possible, but I'm going to ask anyway > (after all I'm not an *expert* on perl, you always learn something > new). > > Is is possible to match: > [EMAIL PROTECTED] with [EMAIL PROTECTED] ?
Hi Dan. For this particular case you can convert the glob expression into a regex as follows: my $re = q|[EMAIL PROTECTED]|; ($re = quotemeta $re) =~ s/\\\*/.*/g; which escapes all regex metacharacters and then replaces all escaped asterisks with dot-star to replace glob's star functionality. Then you can do this: my $str = q|[EMAIL PROTECTED]|; print ( $str =~ $re ? "Match\n" : "Mismatch\n" ); HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]