(.+?):/'; //$regex = '/(\d+):(\d+)pm<..> on Friday,/'; $regex = 'Candle lighting: (\d+):(\d+)pm'; preg_match($regex,$data,$match); $leonhour = $match[0]; $leonmin = $match[1]; $default_post_content = "Leon Leon This is our default post text. Regex is ".$regex."! Hour is ".$leonhour."! and the minute is ".$leonmin."!!"; if (!isset($content) || trim($content)=='') return $default_post_content; return $content; } function get_shabbat_time() { $data = file_get_contents('http://www.hebcal.com/shabbat/?geo=zip;zip=44118;m=72'); //$regex = '/(.+?):/'; //$regex = '/(\d+):(\d+)pm<..> on Friday,/'; $regex = 'Candle lighting: ((\d+):(\d+)pm)'; preg_match($regex,$data,$match); } add_filter("the_content", "set_default_content"); ?>