Allow me to rewrite your regular expression so that you can see the problem more easily:
/^ThisPartDoesNotMatchAndIsInFactIrrelevantToYourProblem|OUTPUT\s*\)/Try it. With the case insensitivity, it will still match. Do you see the problem now? It can be corrected by using grouping (e.g., non-escaped parens) to specify more precisely what you really meant (update: as hv shows very nicely).
In reply to Re: Incorrect Pattern Matching Behavior
by jonadab
in thread Incorrect Pattern Matching Behavior
by T.G. Cornholio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |