Skip to content

Instantly share code, notes, and snippets.

@abdiasriver
Last active August 11, 2021 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdiasriver/c53fe9d7f469c4bf7d481435f36e1c6b to your computer and use it in GitHub Desktop.
Save abdiasriver/c53fe9d7f469c4bf7d481435f36e1c6b to your computer and use it in GitHub Desktop.
App-script-obtener-ID-desde-url-gdrive.md
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