#!/usr/bin/perl -w use strict; my $line = q|$mypic[0] = "one"|; $line =~ s/^\$mypic\[0\] = \"(\w{3})\"\;$/$1/g; print "$line\n";
and i am not sure why the $1 isnt turning out to be one. instead the print statement ends up spitting out the whole line, and i dont understand why.
humbly -c
In reply to regex matching with $1 by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |