<?php
$string = '[rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmorethan80](http://n...content-available-to-author-only...s.in)';
$pattern = '/\[(.{1,80}).*?\]\((.+?)\)/';
$replacement = '<a href="$2">$1</a>';
echo preg_replace($pattern, $replacement, $string);
?>