These regexes to parse an IPFS cid out of a URL are kind of beautiful.

Reply to this note

Please Login to reply.

Discussion

using a positive lookbehind avoids using a group match, e.g. (?<=^\/ipfs\/)[^/]+