Removing Markdown Outgoing Link while keeping its alt text

When copying or clipping text from wikis and webpages, some text will include markdown outgoing hyperlinks. For example:

[Templater](https://github.com/SilentVoid13/Templater) is a template language that lets you insert **variables** and **functions** results into your notes. It will also let you execute JavaScript code manipulating those variables and functions.

With [Templater](https://github.com/SilentVoid13/Templater), you will be able to create powerful templates to automate manual tasks.

Removing the outgoing markdown hyperlink while maintaining the Alt text can be done by installing and using Regex Find/Replace community plugin by Gru80 .

  1. Run the plugin from command pallet with Regex Find/Replace: Find and Replace using regular expressions

  2. Paste the following into Find string:

\[(.*?)\]\(.*?\)
  1. Paste the following into Replace string:
$1
  1. Enable Use regular expressions.

An explanation of what those strings do:

  • \[(.*?)\] captures the text inside the square brackets.
  • \(.*?\) matches the text inside the parentheses (the URL).
  • $1 references the first captured group (the text inside the square brackets) in the replace string.
  1. Click Replace All.

Result:

Templater is a template language that lets you insert **variables** and **functions** results into your notes. It will also let you execute JavaScript code manipulating those variables and functions.

With Templater, you will be able to create powerful templates to automate manual tasks.