my $string = "hello world"; print $string =~ /(.{5})$/; #Or print $string =~ /.{5}$/g; [download]
In reply to Re: substr regex alternative by 2teez in thread substr regex alternative by Anonymous Monk