C# http://47.108.153.10:8090/Build1/使用正则表达式获取中间的47.108.153.10:8090
时间: 2023-12-29 22:05:35 浏览: 154
以下是使用C#正则表达式获取中间的47.108.153.10:8090的代码示例:
```csharp
using System;
using System.Text.RegularExpressions;
class Program
{
static void Main()
{
string input = "http://47.108.153.10:8090/Build1/";
string pattern = @"(?<=//)[^/]+";
Match match = Regex.Match(input, pattern);
if (match.Success)
{
Console.WriteLine(match.Value);
}
}
}
```
输出结果为:47.108.153.10:8090
阅读全文