get_chapter_id():  Separate two aspects of string replacement to allow the
	need for each to vary independently.
diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index ac1b627..f2a319e 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -883,7 +883,8 @@
 
 sub get_chapter_id(){
     my $id = do_cmd_thechapter('');
-    $id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>\./\1/;
+    $id =~ s/<SPAN CLASS="arabic">(\d+)<\/SPAN>/\1/;
+    $id =~ s/\.//;
     return $id;
 }