Is there are way to do this?
So if X is the unwanted character, I'd be looking for something like (.*[^X])
The aim is to match every character in a string until an X turns up.
I've searched high and low, but can't find the answer.
To match everything up to a certain character X
, the simplest should be;
[^X]*