62,046
社区成员
发帖
与我相关
我的任务
分享
Sub Main()
Dim str As String = "a=1&b=2&c=3&d=3&e=3&f=3&g=3&h=3"
Dim d As String = Array.Find(str.Split("&"c), AddressOf TestD).Substring(2)
'.......
End Sub
Function TestD(ByVal s As String) As Boolean
Return s.TrimStart().StartsWith("d=")
End Function
using System.Text.RegularExpressions;
string s = "a=1&b=2&c=3&d=3&e=3&f=3&g=3&h=3";
string sptn = "[&?]d=([^&]*)";
Match m = Regex.Match(s, sptn);
Console.WriteLine(m.Groups[1].Value);//3