C# code to linkify urls in a string

后端 未结 7 1398
Happy的楠姐
Happy的楠姐 2020-11-28 06:17

Does anyone have any good c# code (and regular expressions) that will parse a string and \"linkify\" any urls that may be in the string?

7条回答
  •  被撕碎了的回忆
    2020-11-28 06:46

    Have found following regular expression http://daringfireball.net/2010/07/improved_regex_for_matching_urls

    for me looks very good. Jeff Atwood solution doesn't handle many cases. josefresno seem to me handle all cases. But when I have tried to understand it (in case of any support requests) my brain was boiled.

提交回复
热议问题