+2017-11-09  Pedro Alves  <palves@redhat.com>
+
+       * gdb.base/memattr.exp: Tighten regexes to match the end line.
+
 2017-11-09  Pedro Alves  <palves@redhat.com>
 
        * gdb.base/completion.exp (ignore_and_resync, test_tab_complete):
 
 set see5 0
 
 set info_mem_header_pattern \
-    "info mem.*Num\[ \t\]+Enb\[ \t\]+Low\[ \t\]+Addr\[ \t\]+High\[ \t\]+Addr\[ \t\]+Attrs\[^\n\r]*.."
+    "info mem.*Num\[ \t\]+Enb\[ \t\]+Low\[ \t\]+Addr\[ \t\]+High\[ \t\]+Addr\[ \t\]+Attrs\[^\r\n\]*\r\n"
 
 gdb_test_multiple "info mem" "info mem(1)" {
     -re ${info_mem_header_pattern} {
        # Discard the header.
        exp_continue
     }
-    -re "^1   y  \[ \t\]+$hex $hex wo nocache \[^\r\n\]*.." {
+    -re "^1   y  \[ \t\]+$hex $hex wo nocache \[^\r\n\]*\r\n" {
        set see1 1
        exp_continue
     }
-    -re "^2   y  \[ \t\]+$hex $hex ro nocache \[^\r\n\]*.." {
+    -re "^2   y  \[ \t\]+$hex $hex ro nocache \[^\r\n\]*\r\n" {
        set see2 1
        exp_continue
     }
-    -re "^3   y  \[ \t\]+$hex $hex rw nocache \[^\r\n\]*.." {
+    -re "^3   y  \[ \t\]+$hex $hex rw nocache \[^\r\n\]*\r\n" {
        set see3 1
        exp_continue
     }
-    -re "^4   y  \[ \t\]+$hex $hex rw nocache \[^\r\n\]*.." {
+    -re "^4   y  \[ \t\]+$hex $hex rw nocache \[^\r\n\]*\r\n" {
        set see4 1
        exp_continue
     }
-    -re "^5   y  \[ \t\]+$hex $hex rw nocache \[^\r\n\]*.." {
+    -re "^5   y  \[ \t\]+$hex $hex rw nocache \[^\r\n\]*\r\n" {
        set see5 1
        exp_continue
     }