I'm using regular expressions to allow users on a message board to type certain commands to do different things for example they type /msg username message in order to private message a user.
when i try to use regular expressions to set up the variables i need the variable for message to be anything.
/msg coolguy hello wuts up! =)
$message = eregi_replace("(/msg) ([_a-zA-Z0-9-]+) ()", "\3", $string);
variable \2 is the username they are sending the private message to, but i want variable //3 to not have any criteria to meet, so it can be any character in the entire world, no restrictions. like username is restricted to letters, numbers, underscores and dashes. how do i create the variable \3 correctly because it doesn't work that way.
please help! thnx!