Index: main/trunk/greenstone2/perllib/plugins/BibTexPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/BibTexPlugin.pm	(revision 32123)
+++ main/trunk/greenstone2/perllib/plugins/BibTexPlugin.pm	(revision 32129)
@@ -704,5 +704,5 @@
 		   
     # remove {} around a single character (eg \'{e})
-    $text =~ s@(\\[`'="^~\.]){(\w)}@{$1$2}@g; #`
+    $text =~ s@(\\[`'="^~\.])\{(\w)}@{$1$2}@g; #`
 
     # \, is another way of doing cedilla \c
@@ -711,5 +711,5 @@
     # remove {} around a single character for special 1 letter commands -
     # need to insert a space. Eg \v{s}  ->  {\v s}
-    $text =~ s@(\\[uvcH]){(\w)}@{$1 $2}@g;
+    $text =~ s@(\\[uvcH])\{(\w)}@{$1 $2}@g;
 
     # only do if the text contains a '\' character. 
Index: main/trunk/greenstone2/perllib/plugins/LaTeXPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/LaTeXPlugin.pm	(revision 32123)
+++ main/trunk/greenstone2/perllib/plugins/LaTeXPlugin.pm	(revision 32129)
@@ -369,5 +369,5 @@
     $text =~ s~\\(?:clearemptydoublepage|newpage)~~g;
     ### counters, contents, environments, labels, etc ###
-    $text =~ s~\\(?:addcontentsline){.*?}\{.*?}\{.*}~~g;
+    $text =~ s~\\(?:addcontentsline)\{.*?}\{.*?}\{.*}~~g;
     $text =~ s~\s*\\begin\{itemize}\s*~\n<ul>\n~g;
     $text =~ s~\s*\\end\{itemize}\s*~</li></ul>\n~g;
@@ -378,5 +378,5 @@
 	$text =~ s~<([ou])l>\s*</li>\s*~<$1l>~g;
     }
-    $text =~ s~\\(?:label|begin|end){.*?}\s*\n?~ ~g; # remove tag and contents
+    $text =~ s~\\(?:label|begin|end)\{.*?}\s*\n?~ ~g; # remove tag and contents
     $text =~ s~\\(?:tableofcontents|listoffigures)~ ~g;
     ### font sizes/styles ###
@@ -689,5 +689,5 @@
 
     # remove {} around a single character (eg \'{e})
-    $text =~ s!(\\[`'="^~\.]){(\w)}!{$1$2}!g;  # for emacs indenting... `]);
+    $text =~ s!(\\[`'="^~\.])\{(\w)}!{$1$2}!g;  # for emacs indenting... `]);
 
     ## only in bibtex... not in latex proper?!
@@ -697,5 +697,5 @@
     # remove {} around a single character for special 1 letter commands -
     # need to insert a space. Eg \v{s}  ->  {\v s}
-    $text =~ s~(\\[uvcH]){(\w)}~{$1 $2}~g;
+    $text =~ s~(\\[uvcH])\{(\w)}~{$1 $2}~g;
 
     # only do if the text contains a '\' character. 
Index: main/trunk/greenstone2/perllib/plugins/MediaWikiPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/MediaWikiPlugin.pm	(revision 32123)
+++ main/trunk/greenstone2/perllib/plugins/MediaWikiPlugin.pm	(revision 32129)
@@ -278,5 +278,5 @@
 		while(my $line = <INPUT>){
                     # comment out the body element because we change the body to div
-                    $line =~ s/^(\s*)body(\s*){(\s*)$/$1\/*body$2*\/{$3/isg;
+                    $line =~ s/^(\s*)body(\s*)\{(\s*)$/$1\/*body$2*\/{$3/isg;
                     
                     if($line =~ m/^(.+)\{/i || $line =~ m/^(\s)*#/i){                    
@@ -504,5 +504,5 @@
         my $update_extra_dm = 0;        
         
-        if( $about_package =~ /\S/ && $about_package =~ m/_content_(\s*){/ && $about_package =~ m/$mainpage_toc/){  
+        if( $about_package =~ /\S/ && $about_package =~ m/_content_(\s*)\{/ && $about_package =~ m/$mainpage_toc/){  
 	   print $outhandle "_content_ macro already changed!!!!\n";
 	}
@@ -527,10 +527,10 @@
           # check if there is a content macro   
           my $content_macro_existed = 0;
-          $content_macro_existed = ($about_package =~ /(\s*|\n)_content_(\s*){/);
+          $content_macro_existed = ($about_package =~ /(\s*|\n)_content_(\s*)\{/);
             
           # if there is one
           # append a new section div for toc to the end of the document section                    
           if($content_macro_existed ==1) {
-            $about_package =~ /(\s*|\n)_content_(\s*){(.|\n)*?}/;
+            $about_package =~ /(\s*|\n)_content_(\s*)\{(.|\n)*?}/;
             my $content_macro = $&;                          
             my $new_content_macro = $content_macro;
