← Back to all regex patterns
Extraction
Low backtracking risk

Regex to Extract Markdown Links

This pattern helps pull markdown links into audits, migrations, and content QA workflows.

Regex
/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g

Try this pattern

Matches current input
[Tinapps](https://tinapps.com)

1 match found in the current text.

Passing examples

  • [Tinapps](https://tinapps.com)
  • Read [docs](https://example.com/docs)

Failing examples

  • Just plain text
  • [broken](notaurl)

Code examples

JavaScript
const regex = /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g;
regex.test(input);
Python
import re
pattern = re.compile(r"\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)")
bool(pattern.search(input))
Go
re := regexp.MustCompile("\\[([^\\]]+)\\]\\((https?:\\/\\/[^\\s)]+)\\)")
matched := re.MatchString(input)

Related Extraction Patterns