MicB 1 Posted December 2, 2011 Report Share Posted December 2, 2011 I am scraping a page with products. Thanks to the great tutorial videos veteran users have been posting on Vimeo and YouTube, I've figured out how to download and name the image, but I need to know how to turn the product title to all lowercase and replace the spaces (if they exist) to "-". An example would be: Product Title: Off The WallResulting Product Image Name: off-the-wall.jpg Thanks for any help! Quote Link to post Share on other sites
JohnB 255 Posted December 2, 2011 Report Share Posted December 2, 2011 Try this: set(#title, "Off The Wall", "Global")set(#title, $change text casing(#title, "Lower Case"), "Global")set(#title, "{$replace(#title, " ", "_")}.jpg", "Global") (take one line at a time, copy it and right click in your scripting area to paste. Right click on the words "drag commands here") John These commands can be combined, so let me know if you would rather have one less node. Quote Link to post Share on other sites
JohnB 255 Posted December 2, 2011 Report Share Posted December 2, 2011 Here is the combined code: set(#title, "Off The Wall", "Global")set(#title, "{$replace($change text casing(#title, "Lower Case"), " ", "_")}.jpg", "Global") John Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.