PHP Classes

updated RegEx

Recommend this page to a friend!

      Google Translator  >  All threads  >  updated RegEx  >  (Un) Subscribe thread alerts  
Subject:updated RegEx
Summary:Google have changed their page, here is updated regex
Messages:2
Author:Mark Williamson
Date:2010-06-03 13:47:37
Update:2011-04-08 00:57:55
 

  1. updated RegEx   Reply   Report abuse  
Picture of Mark Williamson Mark Williamson - 2010-06-03 13:47:37
I've just tried using this class, it didn't work and gave me no error output, I did a bit of debugging, and found its because google have changed their page slightly, so your regex isn't matching the translated string anymore,
i've changed the $search_regex in filterOutput method to:


$search_regex = '/<span id=result_box class="short_text">(.+?)<\/span>/';



And now all is working again

thanks for the class.



  2. Re: updated RegEx   Reply   Report abuse  
Picture of Scot Henderson Scot Henderson - 2011-04-08 00:57:55 - In reply to message 1 from Mark Williamson
could you upload a working version of the class as it is very broken .. and example file would be appreciated as well
Regards
Scot