Looking for a Bases formula to find outlinks that do NOT match a regex

What I’m trying to do

I’d like to have a base that lists broken links, excluding those that match a regex.

I can get all broken links with:

uncreated links: file.links.filter(!value.asFile().isTruthy())

But I can’t for the life of me figure out how to exclude broken links based on a regex.

Things I have tried

I’ve read the official doc and done lots of google searches, but I can’t find anything useful.

Can someone help?

file.links.filter(!value.asFile().isTruthy() && /your regex/.matches(value))

Replace your regex with your regex pattern. Keep the opening and closing slashes /.

Excellent; that worked.

I did have to add a ! to the start of the regex cuz I wanted hits that did NOT match the regex.

I appreciate you help @dawni !