java - Is this possible with regular expression? -
()
[]
{}
these valid matches ({)}
false, eg.:
() - true ()[]- true ()[]{} - ture ([]) - false (){[}] - false.
can use regular expression compute this?
no, 1 of known limitations of regular expressions can't tell whether parentheses formed.
Comments
Post a Comment