[ create a new paste ] login | about

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

PHP, pasted on Jun 6:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 <?php

$strings = array(
        'this is a simple string',
        'Arnold once said: "I\'ll be back"',
        'You deleted C:\\*.*?',
        'You deleted C:\*.*?',
        'This will not expand: \n a newline',
        'Variables do not $expand $either');

$patterns = array('~\\\'~', '~\\\\~');
$replacements = array('\\\\\'', '\\\\\\\\');

foreach($strings as $string)
{
        print_r(strip_tags($string,"\n,:/"));
print_r("\n");
}
?>


Output:
1
2
3
4
5
6
 this is a simple string
Arnold once said: "I'll be back"
You deleted C:\*.*?
You deleted C:\*.*?
This will not expand: \n a newline
Variables do not $expand $either


Create a new paste based on this one


Comments: