in reply to Regex to Truncate URLs Nicely
How about something like this?
Works on urls with or without args on the end, the 20 in the middle can be adjusted to fit whatever url you mostly encounter. Best Regards,$url =~ s!^(https?://.*?/)(?:.{20}.*)?(/[^?]*)(\?.*)*!$1(..)$2!
|
|---|