Created
January 22, 2018 22:43
-
-
Save nybblr/f480018a181bf60a66183e1ab3ce23e0 to your computer and use it in GitHub Desktop.
Google sheets functions for meetup
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
function getCost(cell) { | |
return cell.match(/\$[\d.,]+\d/)[0] | |
} | |
function getCondition(cell) { | |
return cell.match(/((like )?new|used|mint|good|great|excellent)/i)[0] | |
} | |
function getEmail(cell) { | |
return (cell.match(/[^\s@]+@[^\s@]+/i) || ['N/A'])[0] | |
} | |
var phoneRegex = /\(?([0-9]{3})\)?[-.●]?([0-9]{3})[-.●]?([0-9]{4})/ | |
function getPhone(cell) { | |
return (cell.match(phoneRegex) || ['N/A'])[0] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment