$re = '/(\B(\?\?|\?)|\B(\!\!|\!)|\B(\[\])|\b(RWC)|\b(TODO))[:;.,-]?\d*($|\s.*$|\(.*$)/mi';
$str = '# Oh yeah, good luck with that.
?? Can I use the gun?
Enough about your promiscuous mother, Hermes! We have bigger problems.
!!- Guards! Bring me the forms I need to fill out to have her taken away!
TODO Shinier than yours, meatbag.
- Wow, you got that off the Internet?
- In my day, the Internet was only used to download pornography.
Would you censor the Venus de Venus just because you can see her spewers?
! No argument here.
RWC: Oh no! The professor will hit me!
[] But if Zoidberg \'fixes\' it… then perhaps gifts!
I was all of history\'s great robot actors - Acting Unit 0. 8; Thespomat; David Duchovny!
[] Five hours? Aw, man! Couldn\'t you just get me the death penalty?
When I was first asked to make a film about my nephew, Hubert Farnsworth, I thought "Why should I?" Then later, Leela made the film. But if I did make it, you can bet there would have been more topless women on motorcycles. Roll film! Um, is this the boring, peaceful kind of taking to the streets?
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php