Skip to content

createObsidianMentionRegExp

Builds the regular expression Obsidian matches a name with, one per name, exactly as its own recomputeUnlinked builds it. Group 1 is the name itself.

Import:

import { createObsidianMentionRegExp } from '@mnaoumov/obsidian-lib/obsidian-word-characters';

Signature:

function createObsidianMentionRegExp(name: string): RegExp

Parameters:

Parameter Type Description
name string A basename or an alias.

Returns: RegExp — The expression, global and case-insensitive.