private boolean isEnclosedInArray(final String rawData){
  return rawData.matches("(?ims)^\\s*\\[.*\\]");
}

private boolean isEnclosedInArray ( final String rawData ) { return rawData . matches ( "(?ims)^\\s*\\[.*\\]" ) ; }
check if the string is enclosed with [ ] ( array ) .
