Community Patterns

Community Library Entry

1

Regular Expression
Created·2022-07-22 11:51
Flavor·.NET 7.0 (C#)

@"
(?:(?:\[(?<text>.*)\])(?:\((?<url>https?\:\/\/.*?)(?:\s\"(?<alt>.*?)\"\)|\)))|(?<text>(?<url>https?\:\/\/\S*)))
"
gm
Open regex in editor

Description

Regex for parsing markdown link. Named group "text", "url" and "alt.

Submitted by anonymous