-
-
Save rianorie/9528531 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str[] = ':[email protected] PRIVMSG #test_channel :test message'; | |
$str[] = ':[email protected] PRIVMSG #test_channel :fii message'; | |
$str[] = ':[email protected] PRIVMSG #test_channel :foo message'; | |
$str[] = ':[email protected] PRIVMSG #test_channel :message test boo'; | |
$str[] = ':[email protected] PRIVMSG #test_channel :blaat fii message'; | |
foreach($str as $s) { | |
preg_match('/:([^!]+)[^:]+:(.*(test|fii).*)/', $s, $matches); | |
print_r( $matches ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment