public static void main(String[] args) {
String path="/home/book_store/magazine";
String path2="/home/book";
if(path.contains(path2)){
System.out.println("find");
}
}
String path="/home/book_store/magazine";
String pattern="/home/book(|/.*)";
if(path.matches(pattern)){
System.out.println("find");
}