Update The updated regex works unless the URL is exactly 53 characters long. In that case I believe bobafifi wants the URL to stay the same (although I could be wrong). Here is one that (as far as I can tell) works for any length...
$url =~ s/^(.{35})(?=.{19}).+(.{15})$/$1...$2/;
In reply to Re: Re: Short URL?
by The Mad Hatter
in thread Short URL?
by bobafifi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |