Get text between two strings Regex VB.Net

后端 未结 5 1815
挽巷
挽巷 2021-01-27 06:36

I really have serious problems with regex. I need to get all text between 2 strings, in this case that strings are <

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-27 07:26

    Thank you very much for answers. I found answer by myself (thanks to Evil Tak i got an idea).

    Dim findtext As String = "(?<=)(.*?)(?=)"
    Dim myregex As String = "Keyboard"
    Dim doregex As MatchCollection = Regex.Matches(myregex, findtext)
    MsgBox(doregex(0).ToString)
    

    StackOverFlow is so powerful...♥

提交回复
热议问题