How to use regex to match an IPFS URL?

I have the following IPFS URL.

https://ipfs.moralis.io:2053/ipfs/QmPQeMz2vzeLin5HcNYinVoSggPsaXh5QiKDBFtxMREgLf/images/0000000000000000000000000000000000000000000000000000000000000001.png

I want to use regex to match this file, but instead of writing the full URL, I want to just match something like https*00000001.png.

The problem is that when I use

  paddedHex = '00000001';
      let tmpSearchQuery = `https*${paddedHex}.png`;

It doesn’t really match anything. Why?

It is not clear how you are trying this. Could you also share the code that you are using to match the url.

Are you trying to match the Id from ipfs url with the Id from tmpSearchQuery?