diff --git a/gdb/contrib/words.sh b/gdb/contrib/words.sh
index e48b82e..a1c2cce 100755
--- a/gdb/contrib/words.sh
+++ b/gdb/contrib/words.sh
@@ -126,9 +126,10 @@
     cat "$@"
 fi \
     | sed \
-	  -e 's/[%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
+	  -e 's/[!"?;:%^$~#{}`&=@,. \t\/_()|<>\+\*-]/\n/g' \
 	  -e 's/\[/\n/g' \
 	  -e 's/\]/\n/g' \
+          -e "s/'/\n/g" \
 	  -e 's/[0-9][0-9]*/\n/g' \
 	  -e 's/[ \t]*//g' \
     | tr '[:upper:]' '[:lower:]' \
