Return to Snippet

Revision: 42167
at February 28, 2011 21:36 by gromitski


Initial Code
yourString = yourString.replace(/\s+/g, '-');

Initial URL
http://gromitski.com/blog/replacing-white-space-in-a-string/

Initial Description
Replace "-" with anything you want to. Useful for amending URLs.

Initial Title
Replace white space in a string with \"-\"

Initial Tags
regex, actionscript

Initial Language
ActionScript 3