in reply to Re^2: Regexp problem matching commands for IRC bot
in thread Regexp problem matching commands for IRC bot

Yeah, I also forgot to explain that if you just use the ^ in the regex it does not work, not does just using $, so there might be something in front and back of !quit in $message.
  • Comment on Re^3: Regexp problem matching commands for IRC bot

Replies are listed 'Best First'.
Re^4: Regexp problem matching commands for IRC bot
by Eimi Metamorphoumai (Deacon) on Dec 17, 2004 at 20:34 UTC
    Have you tried simply printing out the contents of $message?
    print "\$message is '$message'\n";
    That should at least help you figure out why it's not matching.
Re^4: Regexp problem matching commands for IRC bot
by StrifeChild (Novice) on Dec 17, 2004 at 20:38 UTC
    Ah, it looks like: <code> $message is ':Admin!Admin@leet-A0B340B0.host.com PRIVMSG #channel :!quit ' <code> Not good.
      We can't help you if you don't show the code you actually used. The only time you'd get that string in message in the code you showed us was is the $_ was something like
      :something!something PRIVMSG #channel :Admin!Admin@leet-A0B340B0.host.com PRIVMSG #channel :!quit
      (assuming $channel was regexp matching '#channel').