How would you add this please?

Hi, any ideas how you could adapt the code below, to also exclude (at) please ?

	if ($user->data['user_posts'] < 10)
       {
		 if (preg_match('/(@)/i', request_var('message', '', true)))
      	  {
             $error[] = $user->lang['NO_EMAILS'];
          }
       } 

like this?

	
if ($user->data['user_posts'] < 10) {
    if (preg_match('/(@|\\(at\\))/i', request_var('message', '', true))) {
        $error[] = $user->lang['NO_EMAILS'];
    }
} 

Absolutely perfect :slight_smile:

It was the brackets parts that was throwing me, obviously weren’t escaping them properly.

Many thanks for the quick help Fristi :slight_smile: