Extract the Drive fileId from any of the three documented URL shapes.
fileId
Any Drive share URL (/file/d/{id}/view, /d/{id}/..., ?id={id}).
/file/d/{id}/view
/d/{id}/...
?id={id}
The extracted file id, or null if no pattern matches.
null
extractFileId('https://drive.google.com/file/d/abc123/view') // 'abc123'extractFileId('https://example.com') // null Copy
extractFileId('https://drive.google.com/file/d/abc123/view') // 'abc123'extractFileId('https://example.com') // null
Extract the Drive
fileIdfrom any of the three documented URL shapes.