On Wednesday, February 16, 2011 2:09:54 pm Ulrich Weigand wrote: > Ken Werner wrote: > > On Wednesday, February 16, 2011 11:24:21 am Andreas Schwab wrote: > > > Ken Werner writes: > > > > On Tuesday, February 15, 2011 10:01:55 pm Ulrich Weigand wrote: > > > This passes because "char \\\[2\\\]" matches (a substring of) the first > > > output, but you really want to match the whole string "type = char > > > [2]". > > > > > > +gdb_test "whatis c2" "type = char(2| \\\[2\\\])" > > > > Does this also mean: > > gdb_test "whatis c2" "type = .*(char(2| \\\[2\\\]))" > > > > as suggested by Jan? > > No, the implicit ".*" is only at the *beginning* of the match string, > not somewhere in the middle, so that > gdb_test "whatis c2" "type = char(2| \\\[2\\\])" > is equivalent to > gdb_test "whatis c2" ".*type = char(2| \\\[2\\\])" Ah, now it makes sense - thank you! Attached is an updated version of the patch. Ken