[ create a new paste ] login | about

Link: http://codepad.org/6IQWHF4y    [ raw code | output | fork ]

PHP, pasted on Mar 5:
1
2
3
4
5
6
<?php
$test = "I'm only a string - not a number or something like that.
You know that, don't you?";

echo preg_replace('/[^\w\.-]/', '_', $test);
?>


Output:
1
I_m_only_a_string_-_not_a_number_or_something_like_that.__You_know_that__don_t_you_


Create a new paste based on this one


Comments: