This is the input string xxx.xx.xx.xx - - [30/Oct/2020:22:39:54 +0000] -- I want to find date from this particular String i.e. How I suppose to get this Value I want to find pattern "- - [" and want to escape first backslash "/".
I tried below code
Matcher matcher = Pattern.compile("^(.*)- - "["").matcher(data);
if(matcher.find()){
String date = matcher.group();
System.out.println(date);
}
But , it's not taking opening square brace "["