Markdown Link
Match Markdown links [link text](url) and capture both the display text and the URL.
Try it in RegexPro →Available in
Pattern
\[([^\]]+)\]\(([^)]+)\) (flags: g)Raw source: \[([^\]]+)\]\(([^)]+)\)
How it works
Examples
Input
[RegexPro](https://www.regexpro.dev)Matches
[RegexPro](https://www.regexpro.dev)
Input
[Click here](https://example.com/path)Matches
[Click here](https://example.com/path)
Common use cases
- •Markdown parser implementation
- •Link extraction from .md files
- •Documentation link checking
- •Static site generator tooling
Related patterns
Markdown Image
Text ProcessingMatches Markdown image syntax .
Markdown Heading
Text ProcessingMatches markdown ATX-style headings (# through ######).
Java Package Declaration
Text ProcessingMatch Java `package com.example.app;` declarations and capture the dotted package path.
JSON Key-Value Pair (Simple)
Text ProcessingExtract simple `"key": value` pairs from JSON-ish text (strings, numbers, booleans, null).
Related concepts
Lazy vs. Greedy Quantifiers
ConceptGreedy quantifiers (*, +) consume as much as possible before backtracking. Lazy quantifiers (*?, +?) consume as little as possible.
Capturing Groups and Non-Capturing Groups
ConceptParentheses group tokens and capture the matched substring. (?:...) groups without capturing — use it when you want grouping for quantifiers or alternation but don't need the submatch.
How to Escape Regex Special Characters
How-toBackslash-escape any of .^$*+?()[]{}|\ to match them literally. When building a regex from user input, use a full-escape helper function.