regex for URL including query string

前端 未结 6 1592
谎友^
谎友^ 2020-12-10 17:21

I thought this would be a simple google search but apparently not. What is a regex I can use in C# to parse out a URL including any query string from a larger text

6条回答
  •  攒了一身酷
    2020-12-10 18:15

    Check out this guy's QueryString builder class -

    http://weblogs.asp.net/bradvincent/archive/2008/10/27/helper-class-querystring-builder-chainable.aspx

    Microsoft also has a UriBuilder that might help you -

    http://msdn.microsoft.com/en-us/library/system.uribuilder.query.aspx

提交回复
热议问题