【问题标题】:VB.net Regex Get InformationVB.net 正则表达式 获取信息
【发布时间】:2010-05-31 22:31:38
【问题描述】:

我目前正在尝试在这两件事之间插入单词/文本

:和!

我试过了

        Dim nick As String = String.Empty
        Dim p = ":(?<ircnick>.*?)!"
        Dim Matches = Regex.Matches(mail, p, RegexOptions.IgnoreCase Or RegexOptions.Singleline)
        If Matches IsNot Nothing AndAlso Matches.Count > 0 Then
            For Each Match As Match In Matches
                If Match.Groups("info").Success Then
                    nick = (Match.Groups("ircnick").Value)
                End If
            Next
        End If

它不显示任何东西。如果你们可以为我修复此代码,我会很高兴:D。

【问题讨论】:

  • 仍在寻求帮助。

标签: .net vb.net regex client irc


【解决方案1】:

根据this tutorial:!都是保留字。你试过逃避他们吗?

【讨论】:

  • 根据我发布的内容,它给了我解析 "\:\(??)\!\" - To many )'s 这个错误
猜你喜欢
  • 2016-09-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-31
  • 2019-06-20
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多