[ create a new paste ] login | about

Link: http://codepad.org/06oWrSQa    [ raw code | output | fork ]

PHP, pasted on Nov 12:
1
2
3
4
5
6
7
8
9
<?php
function t ( $val )
{
    echo preg_replace("/[^0-9a-zA-Z ]/", "", $val) . "\n";
}

t( "I am a string" ); // "I am a string"
t( "How are you?" ); // "How are you"
t( "#53-Jeff" ); // "53Jeff"


Output:
1
2
3
I am a string
How are you
53Jeff


Create a new paste based on this one


Comments: