() [] {} these are valid matches but ({)} is false, eg.:
() - true
()[]- true
()[]{} - ture
([]) - false
(){[}] - false.
Can I use regular expression to compute this?
() [] {} these are valid matches but ({)} is false, eg.:
() - true
()[]- true
()[]{} - ture
([]) - false
(){[}] - false.
Can I use regular expression to compute this?
No, one of known limitations of regular expressions is that it can't tell whether parentheses are well formed.
