求判断一行代码的正则表达式
public static void main(String[] args){
try{
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/student","root","hongli");
if(!connection.isClosed()){
System.out.println("连接成功");
}

}catch(Exception e){   
System.out.println("数据库连接失败");
e.printStackTrace();  
}
}
比如上面的代码,我要求能判断出上面是一行代码的正则表达式
或者求出上面有几行代码