Advertisement
RobinJ1995

Untitled

Feb 6th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1.     preg_match ('#^\:([^\!]+)\!([^\s]+)\s([^\s]+)\s([^\s]+)(\s([^\s]+))?\:(.+)#i', $buffer, $temp);
  2.     //           ^~~~~~~~~~~~^^~~~~~~~~^^~~~~~~~~^^~~~~~~~~^^^^^^^^^^^^^------^^                   //
  3.     /*
  4.      * :Nick!Host Signal Channel {Parameter} :Message
  5.      *
  6.      * :Auriorx!~chatzilla@Auriorx.digitalplace.beheerder PRIVMSG #dpf :>gok
  7.      * :GokBot!~GokBot@Rizon-14AC94A4.cm-5-1a.dynamic.ziggo.nl KICK #dpf Aha2Y :Spammen doe je thuis, niet in het casino.
  8.      * :Aha2Y!~AhaServ@Dead.With.Sopa.Acta.And.The.Other.Shit JOIN :#dpf
  9.      *
  10.      * #            Delimiter
  11.      *  ^\:([^\!]+)     String zonder ! die begint met :        Nick
  12.      *  \!          !
  13.      *  ([^\s]+)        String zonder whitespaces           Host
  14.      *  \s          Whitespace
  15.      *  ([^\s]+)        String zonder whitspaces            Signal
  16.      *  \s          Whitespace
  17.      *  ([^\s]+)        String zonder whitespaces           Channel (Kan in geval van JOIN/PART preceding : bevatten)
  18.      *  (\s([^\s]+))?   Optioneel: String zonder whitespaces, begint met een whitespace
  19.                                         Optionele parameter (Bevat een preceding whitespace)
  20.      *  \:(.+)      Alles na de :                   Message
  21.      * #i           Delimiter, case insensitive
  22.      */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement