you want /\Q$want\E/ or substruse re 'debug'; my $orig = 'my_stuff[1]=400'; my $want = 'my_stuff[1]='; print "They Match\n" if $orig =~ /$want/; __END__ Compiling REx "my_stuff[1]=" Final program: 1: EXACT <my_stuff1=> (8) 8: END (0) anchored "my_stuff1=" at 0 (checking anchored isall) minlen 10 Guessing start of match in sv for REx "my_stuff[1]=" against "my_stuff +[1]=400" Did not find anchored substr "my_stuff1="... Match rejected by optimizer Freeing REx: "my_stuff[1]="
In reply to Re: How does this regex not match?
by Anonymous Monk
in thread How does this regex not match?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |