=====PHP Regex Pages===== DevPhp>>====Index==== [[PhpRegexRepository PHP Regex Repository]] >> ====Ungreedy Match==== To simply match everything between to fixed strings. The core: ""(.*?)"". For some reason, I can't commit this to memory: %%(php) # DELIMITER START_FLAG (.*?) END_FLAG DELIMITER $regex_p = '~#####(.*?)#####~'; $regex_p = sprintf('~%s(%s)%s~', preg_quote(''), '.*?', preg_quote('')); %% See also Paste20100418 ====References==== [[http://www.php.net/manual/en/reference.pcre.pattern.syntax.php Pattern Syntax]] (php.net)