Help for this page
use warnings; use strict; ... $text =~ s~\bhttps?://\S+([.)?!,]\s?|$|\b)~...$1~g; print $text;
Some sample text to strip ... from. Sometimes the sentence ends with the .... We don't want to remove the +period if that happens, or other punctuation in similar situations.