smsie
public java v1 · immutablepublic class Scratch { public static void main(String[] args) { Pattern p = Pattern.compile(".*\\[.*"); Matcher m = p.matcher("xxx[xxx"); boolean b = m.matches(); if (b) System.out.println("Matched"); else System.out.println("Not matched"); }}