Regex to Parse Hyperlinks and Descriptions

前端 未结 6 1754
长情又很酷
长情又很酷 2020-12-11 07:20

C#: What is a good Regex to parse hyperlinks and their description?

Please consider case insensitivity, white-space and use of single quotes (instead of double quote

6条回答
  •  有刺的猬
    2020-12-11 08:09

    I found this but apparently these guys had some problems with it.

    Edit: (It works!)
    I have now done my own testing and found that it works, I don't know C# so I can't give you a C# answer but I do know PHP and here's the matches array I got back from running it on this:

    Text
    
    array(3) { [0]=> string(52) "Text" [1]=> string(15) "pages/index.php" [2]=> string(4) "Text" } 
    

提交回复
热议问题