Created
March 11, 2015 16:05
-
-
Save sv99/9a783f9f7407730f9e9f to your computer and use it in GitHub Desktop.
color px to int with RegExp
This file contains 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
px2int: (px) -> | |
re = new RegExp("[0-9\.]*") | |
myArray = re.exec px | |
return myArray[0] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment