Python Regex To VB.net
I made a program in Python and now I whant to transfert it to vb.net. But I have some difficulties with the vb.net regular expression.... Someone can help me please?
There are my Python regex:
id = re.search('(?<=watch\?v\=)[\w|-]+|(?<=/v/)[\w|-]+', src)
id = id.group(0)
t = re.search('(?<=\&t\=)[\w|-]+', src)
t = t.group()
It's supposed to fin the value of ?v=Value&SomeOtherContent and &t=Value&SomeOtherCo开发者_开发知识库ntent
Thank you
An easy way to parse query strings is by using a NameValueCollection
, using the HttpUtility.ParseQueryString
method. This also takes care of encoding.
For example:
NameValueCollection parameters = HttpUtility.ParseQueryString("?var1=1&var2=2");
精彩评论