I thought this regex would match lines with a [, but not if it has a ]:
^.*\[.*(?!\]).*$
Instead, it's matching every line with a [ (shown in bold):
This [should match]. This line should match
This line shouldn't match.
This line shouldn't match. This line [shouldn't match.
How to fix that regex so that it doesn't match lines that have a ]?
This [should match]. This line should match
This line shouldn't match.
This line shouldn't match. This line [shouldn't match.
Demo: https://regexr.com/67qk7
