Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 使用正则表达式获取XML类型文件的特定值_.net_Regex_Vb.net - Fatal编程技术网

.net 使用正则表达式获取XML类型文件的特定值

.net 使用正则表达式获取XML类型文件的特定值,.net,regex,vb.net,.net,Regex,Vb.net,我一直在尝试使用正则表达式的很多方法,但我无法找到一种方法。 我有一个包含大量xml类型数据的文件。。。我需要重新回顾一下这个: 一堆数字 我尝试了很多不同的方法让它发挥作用,但我什么都没发挥作用。。只需返回一个空白的anwser 我上次尝试的代码: Dim loc As String = "C:\Users\David\Documents\getconfig.php" Dim w As New System.IO.StreamReader(loc) Dim te

我一直在尝试使用正则表达式的很多方法,但我无法找到一种方法。 我有一个包含大量xml类型数据的文件。。。我需要重新回顾一下这个:

一堆数字

我尝试了很多不同的方法让它发挥作用,但我什么都没发挥作用。。只需返回一个空白的anwser

我上次尝试的代码:

        Dim loc As String = "C:\Users\David\Documents\getconfig.php"
    Dim w As New System.IO.StreamReader(loc)
    Dim test As String = w.ReadToEnd
    Dim r As New Regex("<rss-sync-time>"".*""</<rss-sync-time>")
    Dim matches As MatchCollection = r.Matches(test)
Dim loc As String=“C:\Users\David\Documents\getconfig.php”
Dim w作为新系统IO.StreamReader(loc)
尺寸测试为字符串=w.ReadToEnd
将r设置为新的正则表达式(“'%1!'请尝试以下操作:

Dim r As New Regex("<rss-sync-time>"".*?""</<rss-sync-time>", RegexOptions.Singleline)

Dim r作为新的正则表达式(“”?“您尝试过DOM吗?顺便说一下,您需要向我们展示您试图解析的代码类型