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!
In reply to Re: Regex to Truncate URLs Nicely
by Wonko the sane
in thread Regex to Truncate URLs Nicely
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |