In this text:
warning here there are several types of warnings in this string warning.gif at the end warning end of line warning
I want to match every warning
except warning.gif
.
I cannot seem to get it to include the last one that has no character (control or otherwise) after it.
using warnings?[^\.]
gets what I want except for the last warning (on the last line). I think because there is no character at all after. How can I get it to include that one?