Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<!\\)(?:\[{2}[^\n|]+(?:\|[^\n]+)?]]|\[[^\n]+]\([^\n:]+\))
/
g

Description

This should match any valid Obsidian internal links, in either wikilinks or Markdown format.

It is designed for use with ICU.

Submitted by @Calion - 3 months ago (Last modified 2 months ago)