PHP Regex Pages
DevPhpUngreedy Match
To simply match everything between to fixed strings. The core: (.*?). For some reason, I can't commit this to memory:# DELIMITER START_FLAG (.*?) END_FLAG DELIMITER
$regex_p = '~#####(.*?)#####~';
$regex_p = sprintf('~%s(%s)%s~', preg_quote('<body>'), '.*?', preg_quote('</body>'));
$regex_p = '~#####(.*?)#####~';
$regex_p = sprintf('~%s(%s)%s~', preg_quote('<body>'), '.*?', preg_quote('</body>'));
See also Paste20100418
[Add comment]