Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/17.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
Regex 摘录报纸文章的作者(正则表达式问题)_Regex_Vb.net - Fatal编程技术网

Regex 摘录报纸文章的作者(正则表达式问题)

Regex 摘录报纸文章的作者(正则表达式问题),regex,vb.net,Regex,Vb.net,我试图在VB.Net中提取这两篇报纸文章的作者(我原以为可以使用正则表达式,但没有找到可靠的方法): 到目前为止,我一直在尝试(针对第1条): Mesagebox应显示名称Philip Plickert,但不返回任何内容 是否有人可以给我一个提示或代码,告诉我如何去做(我对正则表达式非常陌生)?试试这个模式: / Dim x As New WebClient() Dim source As String = x.DownloadString("https://www.faz.n

我试图在VB.Net中提取这两篇报纸文章的作者(我原以为可以使用正则表达式,但没有找到可靠的方法):

  • 到目前为止,我一直在尝试(针对第1条):

    Mesagebox应显示名称Philip Plickert,但不返回任何内容


    是否有人可以给我一个提示或代码,告诉我如何去做(我对正则表达式非常陌生)?

    试试这个模式:

    /

    Dim x As New WebClient()
    Dim source As String = x.DownloadString("https://www.faz.net/aktuell/wirtschaft/kein-brexit-chaos-an-grenze-zwischen-frankreich-und-grossbritannien-17130243.html")
    Dim pattern1 As String = Chr(34) & "author" & ":" & Chr(34) & "(.*)" & Chr(34) & ","
    Dim m As Match = Regex.Match(source, pattern1)
    MsgBox(m.Groups(0).ToString)