$re = '/^(?:[[:^print:][:cntrl:]\s]|GIF89.{0,20})*<\?(?:php)?\s*[[:punct:]\s]+scama\s*spotify\s*v1[\s\#]+facebook:\s*fb\.com\/amyr\.gov\.tn+[[:punct:]\s]+.{0,200}?want\s*to\s*save\s*rzlt\s*.html(?:[^>]+>\s*)?$/is';
$str = '<?php
/*
$$$$$$\\ $$$$$$$\\ $$$$$$\\ $$\\ $$\\ $$$$$$$$\\ $$\\ $$\\
$$ __$$\\ $$ __$$\\ $$ __$$\\ $$$\\ $$ | \\__$$ __|$$$\\ $$ |
$$ / $$ |$$ | $$ |$$ / $$ |$$$$\\ $$ | $$ | $$$$\\ $$ |
$$$$$$$$ |$$$$$$$ |$$ | $$ |$$ $$\\$$ |$$$$$$\\ $$ | $$ $$\\$$ |
$$ __$$ |$$ __$$< $$ | $$ |$$ \\$$$$ |\\______|$$ | $$ \\$$$$ |
$$ | $$ |$$ | $$ |$$ | $$ |$$ |\\$$$ | $$ | $$ |\\$$$ |
$$ | $$ |$$ | $$ | $$$$$$ |$$ | \\$$ | $$ | $$ | \\$$ |
\\__| \\__|\\__| \\__| \\______/ \\__| \\__| \\__| \\__| \\__|
#==========================================#
# Scama Spotify v1 #
# facebook: fb.com/amyr.gov.tn #
#==========================================#
$$$$$$\\ $$$$$$\\ $$\\ $$$$$$\\
$$ __$$\\ $$$ __$$\\ $$$$ | $$ __$$\\
\\__/ $$ |$$$$\\ $$ |\\_$$ | $$ / $$ |
$$$$$$ |$$\\$$\\$$ | $$ | \\$$$$$$$ |
$$ ____/ $$ \\$$$$ | $$ | \\____$$ |
$$ | $$ |\\$$$ | $$ | $$\\ $$ |
$$$$$$$$\\ \\$$$$$$ /$$$$$$\\\\$$$$$$ |
\\________| \\______/ \\______|\\______/
*/
$aronxname = "ARON-TN";//<== Your Name
$aronxmail = "moncompteperso12x0@gmail.com"; //<== Your Email
$aronxsave = "no";//<== Write "On" if U want To Save RZlt .html !
?>
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php