Skip to content

Instantly share code, notes, and snippets.

@dpetersen
Created February 15, 2009 00:24
Show Gist options
  • Save dpetersen/64532 to your computer and use it in GitHub Desktop.
Save dpetersen/64532 to your computer and use it in GitHub Desktop.
<html>
<head>
<script type="text/javascript" language="javascript" charset="utf-8">
//<![CDATA[
var test = "200px auto,100px, AUTO";
var result = test.replace(/(\w+)(?:\W+)/g, "$1 ");
alert(result);
//]]>
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment