Index: javascript_aggregator.module
=========================================================
--- javascript_aggregator.module	(revision 1.17.2.16)
+++ javascript_aggregator.module	Wed Apr 14 01:24:23 CEST 2010
@@ -90,9 +90,10 @@
   if (variable_get('preprocess_js', 0)) {
     // Strip out the aggregated JavaScript file.
     $path_to_files_directory = base_path() . file_directory_path();
-    $pattern = "!(<script type=\"text\/javascript\" src=\"$path_to_files_directory)(.*?)(\"(.*?)><\/script>)!";
+
+    $pattern = "!(<script type=\"text\/javascript\" src=\"(.*?)$path_to_files_directory)(.*?)(\"(.*?)><\/script>)!";
     if (preg_match_all($pattern, $scripts, $matches) > 0) {
-      $aggregated_file_name = $matches[2][0];
+      $aggregated_file_name = $matches[3][0];
       $jsmin_file_name = $aggregated_file_name .'min.js';
 
       // Construct the final JSMin file path.
