ben şöyle yazarım

preg_match('#<span class=text3 id=465654>(.*?)</span>#is',$anaicerik,$istenenyer);