Hi, I’m trying to get with the new Bases plugin.
I’d like to filter files that two capital letters as filename. I.e. VD.md, SO.md and so on.
I’d like to know if I can somehow use regex for this.
I’ve tried this file.name.contains("^[A-Z]{2}\\.md$") but no success.
Pch
2
You could try using matches() instead
:
/^[A-Z]{2}$/.matches(file.name)
or, if you want to use the fullname (the name + extension) of the note, like you did, this seems to work:
/^[A-Z]{2}\.md$/.matches(file.fullname)
3 Likes
Perfect, thank you! I did try matches but I must’ve used it incorrectly.
1 Like
system
Closed
4
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.