A regular expression to match a markdown-style URL link with or without title text.
/\[([^\]]+)\]\(([^)"]+)(?: \"([^\"]+)\")?\)/
Matches:
- [Regex](https://regexpattern.com/)
- [Regex](https://regexpattern.com/1.html)
- [Regex](https://regexpattern.com/ “Link Title”)
- [Managed Disks](#managed-disks)
- [Managed Disks](../linux/overview.md#managed-disks)
Non-matches:
- ## <a name=”anchortext” />Header text
- https://regexpattern.com/
- [Regex][https://regexpattern.com/]
See Also:
- URL (With And Without Port Number) Regular Expressions
- Regular Expression To Match All URLs In Text
- Regex To Match One Parameter In URL Query String
- Regex To Extract Domain Name From URL
- DNS Hostname Regular Expression
- Regex To Match All Parameters In A URL
- Regex To Match The Last Path (Segment) Of A URL