preg_match in df() function fix