You can use this regular expression to match markdown links:
\[(.*?)\]\(.*?\)
Explanation:
\[
and\]
match a literal open and close bracket.(.*?)
matches any character (.
), repeated any number of times (*
) but as few as possible (?
). The brackets create a capture group.\(
and\)
match a literal open and close parenthesis..*?
matches any character, repeated any number of times but as few as possible.