Yes. Actually, a more interesting example which does not complicate the statement (not the problem) too much is to check for nested parenthesis and brackets:
(([[()])) -> ok ((([](])) -> not ok
Hope OP gets this message.
(([[()])) -> ok ((([](])) -> not ok
Hope OP gets this message.
EDIT: The wikipedia article that is.