Bu mesajları ayrıştırmama yardım eden var mı? Bu yanıtlar bir TCP soket bağlantısından bir twitch kanal sohbetine gönderilir. Bazen yanıtlar, özellikle telaşlı kanallarda, bazen birden fazla mesajdır. Aşağıda "yanıt- - -" kullanarak 1 yanıt görebilirsiniz. İlk 3 yanıtın 2 mesajı var, sonraki üçünün 1'i var ve sonraki ikisinin birden fazlası var.
Response ---- :[email protected] PRIVMSG #xqcow :ring them up
:[email protected] PRIVMSG #xqcow :karma for laughing at the dancing guy FeelsBadMan
Response ---- :[email protected] PRIVMSG #xqcow :!emotes bttv
:[email protected] PRIVMSG #xqcow :CiGrip
Response ---- :[email protected] PRIVMSG #xqcow :H H H H H H
:[email protected] PRIVMSG #xqcow :OMEGALUL
Response ---- :koolaidjammer__!koolaidjammer__@koolaidjammer__.tmi.twitch.tv PRIVMSG #xqcow :xqcHead xqcHead xqcHead
Response ---- :its_physikz!its_physikz@its_physikz.tmi.twitch.tv PRIVMSG #xqcow :xqcSus BLOW PIPES?
Response ---- :syon_!syon_@syon_.tmi.twitch.tv PRIVMSG #xqcow :CiGrip ONLY 40?
Response ---- :[email protected] PRIVMSG #xqcow :MARIJUANA
:choomoo__!choomoo__@choomoo__.tmi.twitch.tv PRIVMSG #xqcow :HOW IS THERAPY BATCHEST OMEGALUL
:[email protected] PRIVMSG #xqcow :LULW
:[email protected] PRIVMSG #xqcow :CiGrip NICE
:[email protected] PRIVMSG #xqcow :H GG
Response ---- :tnr_gio!tnr_gio@tnr_gio.tmi.twitch.tv PRIVMSG #xqcow :mothakeeeeee
:[email protected] PRIVMSG #xqcow :xqKaren IM STRESSIN BRUH
:logic_al!logic_al@logic_al.tmi.twitch.tv PRIVMSG #xqcow :i'll smoke to that
:[email protected] PRIVMSG #xqcow :madafeh PepegaPls madh PepegaPls madafuPepegaPls madaPepegaPls mada PepegaPls
:[email protected] PRIVMSG #xqcow :FeelsBadMan
Bir yanıttaki her mesajın iki tane olduğundan beri düşünüyordum ":" Dizeyi her iki ile ayırmayı düşünüyordum ":" regex kullanarak. Herhangi bir yardım takdir edilmektedir