Forum Moderators: coopster
"blue items (pack of 12)"
It creates an key in the format:
"blue-items-pack-of-12"
...you'll see that all punctuation has been replaced by a hyphen. It's this bit that I don't know how to do in a single hit.
Any ideas how I go about this?
Thanks, Pete
This will take any bits of the string that aren't alphanumeric characters and turn them into single spaces, then trim any leading or trailing spaces, then replace the spaces with hyphens.
The reason I didn't go straight to hyphens is because that last parenthesis would become a trailing hyphen.