从字符串

时间:2017-03-26 21:24:27

标签: node.js string object split

我有一个这样的字符串:

L 03/27/2017 - 00:19:49: rcon from "ip": command "command"
{"json":"text","here":text"}
L 03/27/2017 - 00:19:49: rcon from "ip": command "command"

对象可能看起来像这样(你不可能知道每次有多少行):

L 03/27/2017 - 00:19:49: rcon from "ip": command "command"
{
    "matchid": "",
    "gamestate": 0,
    "plugin_version": "1",
    "paused": false,
    "gamestate_string": "none"
}
L 03/27/2017 - 00:19:49: rcon from "ip": command "command"

问题是如何删除对象之间的线,而不是如何解析它。

感谢。

0 个答案:

没有答案