http://some-shop.com/dir1/dir2/buystuff.cgi?x=1&y=2&z=3
to something like
http://some-shop.com/(...)/buystuff.cgi?x=1&y=2&z=3
and the second regex to remove anything at the end if there is a long query string at the end. But only doing anything if the URL is over 50 chars.(then again I might just use a couple of splits and some concatenation magic instead, but that would depend on what all my data looked like.)
Good Luck.
-enlil
In reply to Re: Regex to Truncate URLs Nicely
by Enlil
in thread Regex to Truncate URLs Nicely
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |