MTGDarkness
03-22-2009, 01:47 AM
I have this code:
$mepattern = '/\/me([^\r\n]+)/is';
if(preg_match($mepattern, $this->post['message']))
It's half the /me hack that I downloaded. However, it got greedy and started detecting all /mes. Annoying when you're using URL rewrites and one of your forums is named metaboard... :down: Basically, I need it to only detect /mes at the beginning of a new line. :( And I am really bad with Regex. Also, what does that one snippet ([^\r\n]+)/is mean?
$mepattern = '/\/me([^\r\n]+)/is';
if(preg_match($mepattern, $this->post['message']))
It's half the /me hack that I downloaded. However, it got greedy and started detecting all /mes. Annoying when you're using URL rewrites and one of your forums is named metaboard... :down: Basically, I need it to only detect /mes at the beginning of a new line. :( And I am really bad with Regex. Also, what does that one snippet ([^\r\n]+)/is mean?