Created
August 21, 2014 23:36
-
-
Save victorkurauchi/d64b1e7d1d53d4b66991 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function snake(string) { | |
| var my = string.replace(/([ ])/g, function($1) { | |
| //alert($1); | |
| return "_"; | |
| }); | |
| alert(my); | |
| return my.replace(/-/g, ''); | |
| } | |
| alert(snake('Simeticona 125mg com 10 cápsulas gelatinosas - teuto - genérico')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment