HeySince I've learned my lesson about parsing without a parser, allow me to point you to Parse::IRC, which could be a lot of help to you. Enjoy! Hays | [reply] |
Hi Shadow1,
It will help you immensely if you can provide some examples of the messages you're trying to parse. Without that, you'll get a lot fewer responses, and only then from people who happen to know what the output from an IRC channel looks like.
Needless to say, if you can provide some of the code that you've written (even if it isn't yet quite working), it will also help a great deal towards given you a quicker/better answer, since it will provide a context.
s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
| [reply] |
Try something like this (untested): s/\cK\d{1,2}(?:,\d{1,2})?|[\cK\cB\cI\cU\cR\cO]//g
Update: ikegami is right indeed. Try this then:
s/\cC\d{1,2}(?:,\d{1,2})?|[\cC\cB\cI\cU\cR\cO]//g
| [reply] [d/l] [select] |
\cK should be \cC (at least for mIRC and ircle). Ctrl-K is the shortcut key used to insert colour, but Ctrl-C is the code that is actually inserted.
| [reply] [d/l] [select] |