[EMAIL PROTECTED] wrote: > I have the following lines: > > g00:~> perl -e ' > $a = "aa** a"; Since you have * which in a regex stands for zero or more occurances, then you must turn this off as part of the processing. You use \Q and \E as in /^\Q$b\E/ would take the aa** a as just that.
I would get away from the $a and $b as variables since this are default variables for sort and can cause you problems in the future if not careful. Wags ;) > $b = $a; > $b =~ qw/$b/; > print "Yes\n" if $a =~ /^$b/; > print $b' > Nested quantifiers in regex; marked by <-- HERE in m/^aa** <-- HERE > a/ at -e line 5. > > Is there a way to make the regexp takes '$b' as string, because > I see the non characters are problem. > > Thanks > > ------------------------------------- > This mail is from: <[EMAIL PROTECTED]> > ------------------------------------- Any questions and/or problems, please let me know. Thanks. Wags ;) Int: 9-8-002-2224 Ext: 408-323-4225x2224 ******************************************************* This message conatains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ******************************************************* -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>