It is a frequently asked Perl question how to write a regular expression that matches anything but “something”. The usual answer is that it can’t be done or that you need to use the !~ operator instead of the =~ operator. But when you are using API’s that passes regular expressions around as objects this might not be entirely helpful answers.
By digging a bit around in the scarier parts of the perlre manual page I worked out this quite Perl specific solution: qr/(?:(?:something(*COMMIT)(*FAIL))|.)*/.
I am not sure that it works in all possible corner cases and I certainly don’t want to write the much needed comment that makes the code using the regexp maintainable.
In the end it might be possible, but it is just one of those “Now you have two problems” scenarios.