How can I eliminate lines from a file “for start and end with specified characters” without repeating it

For example on different cases:

char start --> [
char end   --> ]
*****************

line | state
-----------------
[hello]   --> matched
---------

[hello    --> not matched
hello]    --> not matched
...
[[hello]  --> not matched
[[hello]  --> not matched
...
[hello]]  --> not matched
[hello]]  --> not matched
...
[hello [ hello] --> also not matched
[hello ] hello] --> also not matched

So, the specified characters in the example above will never be repeated in the text. And the same time will contain the specified start and end character.