How get only "file id" from url Google Drive?

Hey!
I have a url with a file on Google Drive.
What script in the function node can get the “file id” from the url Google drive?
Or can it be done in some other way?

You can use the following code:

items.forEach(item => {
  item.json.fileId = item.json.col_3.split('/')[5];
});
return items;

Here the example workflow:

{
  "nodes": [
    {
      "parameters": {
        "functionCode": "return [\n  {\n    json: {\n      col_3: 'https://drive.google.com/file/d/xxxxx1/view?usp=sharing'\n    }\n  },\n  {\n    json: {\n      col_3: 'https://drive.google.com/file/d/xxxxx2/view?usp=sharing'\n    }\n  }\n];"
      },
      "name": "Mock Data",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "items.forEach(item => {\n  item.json.fileId = item.json.col_3.split('/')[5];\n});\nreturn items;"
      },
      "name": "Get File ID",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    }
  ],
  "connections": {
    "Mock Data": {
      "main": [
        [
          {
            "node": "Get File ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Thanks Jan!
I try it and response later.