I have the following script for getting a response from the Twilio number when a sms is sent to it. However, when I run my script, it doesn't work for all keywords. I am not sure why? It runs for '1' and 'hello' as keywords but that's it.

Code:
<?php

require __DIR__ . '/twilio-php-master/Twilio/autoload.php';

$from = $_REQUEST['From'];
$body = $_REQUEST['Body'];
$result = preg_replace("/[^A-Za-z0-9]/u",
...