Replacing spaces with hyphens in token

Hi
Not sure about this one, but I am struggling.

I need to replace all spaces with a hyphen in a token to form a URL to take me to a product page.

http://www.groundcaretrader.com/#!tractors/c1exz has the components of the URL but needs a - to find the 'escaped fragment' page which I can scrape.
For example: http://www.groundcaretrader.com/?_escaped_fragment_=Kubota-F2560-Outfront-Rotary-Mower/c1se7

I can grab the end code in the URL, but the make-model-category appears with no hyphens in the results page.

this is where I need to replace the spaces.

Hop this makes sense - I sure this is something I should be able to work out myself, but I have run out of brain power.
Thanks
Jason

In a script, just do

In a script, just do something like:

url = dataRecord.get("URL");
url = url.replaceAll(" ", "_");
session.setv("URL", url);

Brilliant thanks!

Thanks - got it working a treat

Jason