With regex how do i match between an XML tag multiple times?

后端 未结 5 1593
再見小時候
再見小時候 2020-12-21 11:41

First, before you say anything, i HAVE to do this because the RSS is malformed, but i can\'t correct it on my end. So, while I tried using an RSS and a XML parser, they fail

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-21 12:22

    Try an ungreedy expression by adding the U flag:

    "/(.+)/U"
    

    This tells it to match on the smallest match rather than the largest match available.

提交回复
热议问题