src/org/tiefaces/components/websheet/utility/ParserUtility.java
private static int findPairBracketPosition(final String str, final int startPos) {

	    
		int bracketNum = 0;
	    for (int i = startPos; i < str.length(); i++)
	    {
	        char current = str.charAt(i);
	        if (current == TieConstants.EL_START_BRACKET)
	        {
	            bracketNum++;
	        } else if (current == TieConstants.EL_END )
	        {
	        	bracketNum--;
	        	if (bracketNum <=0 ) {
	                return i;
	        	}
	        }
	    }   
	    return -1;		
	}
private static int findPairBracketPosition(final String str, final int startPos) {

	    
		int bracketNum = 0;
	    for (int i = startPos; i < str.length(); i++)
	    {
	        char current = str.charAt(i);
	        if (current == TieConstants.EL_START_BRACKET)
	        {
	            bracketNum++;
	        } else if (current == TieConstants.EL_END )
	        {
	        	bracketNum--;
	        	if (bracketNum <=0 ) {
	                return i;
	        	}
	        }
	    }   
	    return -1;		
	}
Find pair bracket position.

@param str the str
@param startPos the start pos
@return the int