Regex - Split string at every datetime

后端 未结 2 2035
不知归路
不知归路 2020-12-12 00:44

I\'m trying to split up a update string I get from a feed into an array each time there is a time stamp.

This is the regex I have so far, but it seems to only find t

2条回答
  •  一向
    一向 (楼主)
    2020-12-12 01:01

    Dont anchor it to the start of the string, hence get rid of the ^

    (\d{1,2}\/\d{1,2}\/\d{4})
    

提交回复
热议问题