Regex – how to match everything except a particular pattern

You could use a look-ahead assertion: (?!999)\d{3} This example matches three digits other than 999. But if you happen not to have a regular expression implementation with this feature (see Comparison of Regular Expression Flavors), you probably have to build a regular expression with the basic features on your own. A compatible regular expression with … Read more

Why doesn’t this FINDSTR example with multiple literal search strings find a match?

Apparantly this is a long standing FINDSTR bug. I think it can be a crippling bug, depending on the circumstances. I have confirmed the command fails on two different Vista machines, a Windows 7 machine, and an XP machine. I found this findstr – broken ??? link that reports a similar search fails on Windows … Read more

What are the undocumented features and limitations of the Windows FINDSTR command?

Preface Much of the information in this answer has been gathered based on experiments run on a Vista machine. Unless explicitly stated otherwise, I have not confirmed whether the information applies to other Windows versions. FINDSTR output The documentation never bothers to explain the output of FINDSTR. It alludes to the fact that matching lines … Read more