[libcxx] Make the GDB pretty printer test less strict

This is a workaround for PR48937. GDB can sometimes print additional
warnings which currently fails the test. Use re.search instead of
re.match to ignore this additional output.

Differential Revision: https://reviews.llvm.org/D99532

GitOrigin-RevId: 9ac988f6a80aa1dd25594a8b4c86c0380ac99466
diff --git a/test/libcxx/gdb/gdb_pretty_printer_test.py b/test/libcxx/gdb/gdb_pretty_printer_test.py
index af473c4..19e9a4a 100644
--- a/test/libcxx/gdb/gdb_pretty_printer_test.py
+++ b/test/libcxx/gdb/gdb_pretty_printer_test.py
@@ -49,7 +49,7 @@
             expectation_val = compare_frame.read_var("expectation")
             check_literal = expectation_val.string(encoding="utf-8")
             if "PrettyPrintToRegex" in compare_frame.name():
-                test_fails = not re.match(check_literal, value)
+                test_fails = not re.search(check_literal, value)
             else:
                 test_fails = value != check_literal