Awkwardsaw
2010-06-24 22:47:27
i'm making a perl irc bot, and im having trouble parsing this D:
i need to get 'akwardsaw!~myip PRIVMSG #ethan :s/lol//;' parsed into 2 different variables.. i need 'akwardsaw' in one, and every thing after 'PRIVMSG #ethan :' into an other, and im having lots of troubles with it D:
what i have to get the message:
$messge = $in =~ /PRIVMSG $chan \s+(.*)/;
where $in is the variable that holds the string, and $chan is the channel the bot is in. i suck at regex, and im sure im missing something :p
i need to get 'akwardsaw!~myip PRIVMSG #ethan :s/lol//;' parsed into 2 different variables.. i need 'akwardsaw' in one, and every thing after 'PRIVMSG #ethan :' into an other, and im having lots of troubles with it D:
what i have to get the message:
$messge = $in =~ /PRIVMSG $chan \s+(.*)/;
where $in is the variable that holds the string, and $chan is the channel the bot is in. i suck at regex, and im sure im missing something :p