i am a beginner in PHP and would want to replace ">" and every other character after it in a string.
http://www.example.com/>testmail
This should do the trick
<?php
$string = 'http://www.example.com/>testmail';
$pattern = '/(>(.*?))$/i';
$replacement = 'helloWorld';
echo preg_replace($pattern, $replacement, $string);
More about preg_replace; http://php.net/manual/en/function.preg-replace.php