Get text between two strings Regex VB.Net

后端 未结 5 1748
挽巷
挽巷 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:32

    This does the job easily and beautifully. It won't return a match when there is no text inside the span, so you do not need to worry about empty matches. It will however return groups with only whitespace in them.

    (.+)
    

    Test it out here.

提交回复
热议问题