The error is because you need to have delimiters around your regex. Traditional is to use slashes. I noticed you didn't have parentesis around the character after the question mark as well. I've corrected it.
preg_replace( "/\\?([A-Z])/", "? \\\\1", "Is this a test?No." );
By the way, this only checks that the character after the question mark is not an upper case letter. If it were a number, lower case letter, etc, then this doesn't change it. Not necessarily a problem, just making sure you know. 🙂