Java tutorial
//package com.java2s; public class Main { private static boolean isIndex(String indexString) { return indexString.startsWith("[") && indexString.endsWith("]"); } }