There's a lot of articles about using dashes as word separators in urls - however none of them really cover the edge cases like hyphenated words or composite words with spaces in the url.
I have a real-estate site that uses hyphens as separators, and the relative path contains a lot of information about the property. And example might be:
/property/qld/nundah-4012/81-nellie-st-nundah-qld-4012-4138766
It is of the format /[property-type]/[state]/[suburb]-[postcode/zip]/[street number][street name][street type][suburb][state][postcode/zip][propertyId]
.
The problem comes when we have suburbs or streets that are hyphenated or have spaces in them - like 'Brighton-Le-Sands' or 'Eight Mile Plains' - when we use dashes as separators the format of the word is lost.
We are using regex on the url and simply removing all dashes for spaces returns incorrect tokens when there's hypenated or space separated words. We can use pluses (+) for words with spaces, but what about hyphenated words? Does anyone out there have experience with this?