Hello, I have a doubt which might seem basic but here it is:
my $a = "This is Perl"; $a =~/^(.+)(e|r)(.*)$/;
I get $1= This is Pe; $2= r; $3= l;
According to me, it should be "$1= This is Perl". $2 and $3 should be null. So my doubt is how are the capture brackets evaluated?
In reply to Basic Regular expression by skkeni04
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |