--- /work/projects/trunk/drupal/drupal_code/includes/language.inc	2009-03-03 15:19:14.000000000 +0200
+++ includes/language.inc	2009-01-03 01:37:48.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: language.inc,v 1.14 2008/01/06 16:46:02 goba Exp $
+// $Id: language.inc,v 1.14.2.1 2009/01/02 23:37:48 dries Exp $
 
 /**
  * @file
@@ -80,8 +80,8 @@ function language_from_browser() {
       // The language part is either a code or a code with a quality.
       // We cannot do anything with a * code, so it is skipped.
       // If the quality is missing, it is assumed to be 1 according to the RFC.
-      if (preg_match("!([a-z]+)[a-zA-Z-]*(;q=([0-9\\.]+))?!", trim($browser_accept[$i]), $found)) {        
-      $browser_langs[$found[1]] = (isset($found[3]) ? (float) $found[3] : 1.0);
+      if (preg_match("!([a-z-]+)(;q=([0-9\\.]+))?!", trim($browser_accept[$i]), $found)) {
+        $browser_langs[$found[1]] = (isset($found[3]) ? (float) $found[3] : 1.0);
       }
     }
   }
