[ create a new paste ] login | about

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

PHP, pasted on Sep 9:
1
2
3
4
5
6
<?php
    $string = '"hey how are you going Mr. Matt"';
    $pattern = '/[^a-zA-Z]/';
    $replacement = '-';
    echo preg_replace($pattern, $replacement, $string);
?>


Output:
1
-hey-how-are-you-going-Mr--Matt-


Create a new paste based on this one


Comments: