Regex Notes
Regex Notes allow you to leverage your existing note name structure. You can turn a note into a regex note by adding the following to your frontmatter:
---BC-regex-note-regex: "<regex>"BC-regex-note-field: "<field>"---Where <regex> is a valid JavaScript regex (without the surrounding /), and <field> is one of your edge fields. This will tell Breadcrumbs to find all notes that match the regex (using the full path of the note), and add edges from the regex note to the matches using the field you specify.
[!NOTE] The
BC-regex-note-regexvalue gets passed directly to the Javascript RegExp constructor, so you can use that to troubleshoot your regex.
For example, find all notes with the word psychology in the path, and point down to them:
---BC-regex-note-field: "down"BC-regex-note-regex: "psychology"---graph TB 1(Regex Note.md) -->|down| 2(psychology/DSM 5.md) & 3(university/psychology course.md)
BC-regex-note-flags
Section titled “BC-regex-note-flags”You can also add flags to the regex by adding the BC-regex-note-flags field to the frontmatter of the regex note.
---BC-regex-note-flags: "<flags>"---Where <flags> is a string of any combination of g, i, and m (for global, case-insensitive, and multi-line, respectively). e.g. gim would add all three flags.
[!TIP] In practice, the most useful flag is
i, to match case-insensitively. i.e.BC-regex-note-flags: "i"
Settings
Section titled “Settings”- Default field: Choose a fallback field to use when only
BC-regex-note-regexis present. This is useful if you have a lot of regex notes, and don’t want to add theBC-regex-note-fieldto each one.