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

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

asp.net - Configuring WCF Services in Code WCF 4.5 -