3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $matches = array(); $param_string = "CREATED_AT > TO_DATE(:delete_date, 'DD/MM/YYYY HH24:MI:SS') AND"; $regex = '/[^A-Za-z](:\b[^\s:]+)\b[^:]/i'; $repl = '\1'; $param = preg_replace($regex, $repl, $param_string); print "$param\n"; $param = preg_match($regex, $param_string, $matches); print_r($matches);
based on gBIu6
Output for 4.3.0 - 7.2.0
CREATED_AT > TO_DATE:delete_date 'DD/MM/YYYY HH24:MI:SS') AND Array ( [0] => (:delete_date, [1] => :delete_date )