The URL to extract hash from
The IPFS hash or null if not found
extractIpfsHash("ipfs://QmHash123") // Returns: "QmHash123"
extractIpfsHash("https://gateway.pinata.cloud/ipfs/QmHash123") // Returns: "QmHash123"
extractIpfsHash("QmHash123456789012345678901234567890123456") // Returns: "QmHash123456789012345678901234567890123456"
extractIpfsHash("https://example.com/file.json") // Returns: null (not IPFS)
extractIpfsHash("ipfs://QmHash/subdirectory") // Returns: null (subdirectories not supported)
Extract IPFS hash from various URL formats
Edge Cases: