Finding duplicates via script, REGEX...?

My goal is to detect overlapping usage of a resource on the same date and provide information of the respective overlapping record. For example:

  1. 2022-08-04-Resource1 User1 → Show User2
  2. 2022-08-04-Resource1 User2 → Show User1

I’m using an adapted version of the mark duplicate script to link records that share a matching string with each other and look/roll up information from the respective other. That worked fine until the growing dataset started causing script timeout issues (60s).

Recently @Justin_Barrett taught me how to use REGEX extract. I thought to instead create a roll-up on the resouce and REGEX extract the records string out of it. Unfortunately, it will only match the first string (and seems not easy to exclude itself).

I wondered whether there’s another way to achieve this?