Others here are better (and faster) with regexps than I. They have provided answers below. My question to you would be:
What is the reason for wanting to use a regex to perform a substr on a string when there's a substr function already?
In reply to Re^3: how to shorten given string?
by Yendor
in thread how to shorten given string?
by mellin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |