Man! I hate regex. By brain shortcircuits any time I come within 100 meters of one.
nostr:npub12vkcxr0luzwp8e673v29eqjhrr7p9vqq8asav85swaepclllj09sylpugg, you appear to be accidentally swapping out entire URLs that contain npub addresses, rather than only when they're listed alone or with the nostr: prefix. It's probably an error in your regex, but this makes it hard for your users to find out about other apps by following hyperlinks they see in their Primal feed. Also, I often do this to share some particular information displayed on the other app, and if you swap out the links, then the readers can't see what I intended.
Here, two examples from Jumble and Lumina.
Discussion
Same, I spent a week on a markdown regex and then we found a bunch of errors in it, and I took a week off, to work on other things, because I was like
NOT TODAY, REGEX!
I've also noticed that AI is even worse at regex than humans are, which says a lot.