Bases: can I use a frontmatter property as a regex in matches

What I’m trying to do

filter notes by name in a bases table using a string stored in frontmatter

Things I have tried - openly admitting to massively guessing

filters:
   and:
      - note.artist.matches( file.name )
filters:
   and:
      - file.name.matches( note.artist )

You could try to play around with this (using maybe this.note.artist) :blush: :

See here: Access properties of the current file

I’m successfully getting my frontmatter string using note.artist. Using it as a regex is the thing that’s stumping me.

To be honest, I would probably just use .contains() before going to RegEx :smile:

You might need to convert the note.artist into a proper RegEx though :thinking: (surrounding it by a slash (/))

I need regex, I’m afraid.

surrounding with ‘/’ isn’t doing the job. I think it’s just treating the actual text between the slashes as a string rather than picking up the property

After a quick test, this is indeed what seems to be happening :face_without_mouth:

bummer. Thanks for the input, though.