Last active
August 11, 2021 21:00
-
-
Save abdiasriver/c53fe9d7f469c4bf7d481435f36e1c6b to your computer and use it in GitHub Desktop.
App-script-obtener-ID-desde-url-gdrive.md
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 extractUrlID() { | |
// Cambia PEGALAURLAQUI por la url ejemplo https://drive.google.com/file/d/1pYOc5rVnGRZsVC9rjPbOemj2dc1E5ZYw/view url gdrive | |
var Url = 'PEGALAURLAQUI'; | |
// use a regex to extract the ID | |
var expression = Url.match(/[-\w]{25,}/); | |
Logger.log(expression); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment