Mine
public php v1 · immutable<?php function slash_me ($str) { #$str = preg_replace('/^\/me/', '* foo', $str); $s1 = '/^\/me/'; $s2 = '<span style="color:red;">* foo </span>'; $str = preg_replace ($s1, $s2, $str); return $str; }?><?php $string = nl2br($_POST['string']); if (empty($string)) { echo "damn empty"; } else { echo slash_me($string); }?><form action="" method="post"><textarea name="string"></textarea><input type="submit" name="click" /></form>