[ create a new paste ] login | about

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

PHP, pasted on Sep 30:
1
2
3
4
5
6
7
<?php
        
$string = 'Some text on some more text before some text';
        
$newString = preg_replace('/(.*)on(.*)before(.*)/', '$2', $string);
        
echo $newString;


Output:
1
 some more text 


Create a new paste based on this one


Comments: