我使用正则表达式从html文件中提取链接的起始索引和结束索引。索引来自表示整个文件的字符串。如何提取起始索引和结束索引之间的链接?
答案 0 :(得分:1)
编辑:我刚看到它被VB.NET搞砸了。您可以使用String.Substring()方法:
Dim startIndex As Integer = 0
Dim endIndex As Integer = 10
Dim s As String = "Hello, this is an example. You can use string.Substring() for this."
s.Substring(startIndex, endIndex - startIndex + 1)
有关完整文档,you can go to the MSDN.