in reply to Regex to match last n characters of a string

oops,sorry about that

I should have looked at this a little better,

use strict;
use warnings;
use diagnostics;
my $buffer="a"x50;
$buffer =~ /(.{41})$/;
print $1;


now this actually works.
The perl "Perlre" doc has the answer (in a better way then i can phrase it. I think that the curly bracket was been interpretted as a normal character and not a quantifier.
again sorry for original post.
  • Comment on Re: Regex to match last n characters of a string