Its often beneficial to replace regular expressions with simpler
functions that have the same effect.
With Regular Expression:
<?php
if (preg_match ('/(.*)\@(.*)/', $data, $matches)) {
print $matches[2];
}
?>
Without Regular Expression:
<?php
$pos = strrpos ('@', $data);
if ($pos !== false) {
print substr ($data, $pos);
}
?>
In other cases it may help to use regular expressions instead of custom
parse routines in your PHP code.