//--------------------------
正则表达式:1.知识点回顾:1)解析字符串"192.168.10.5[port=8080]",将其表示成"IP地址为***的服务器的***端口是打开的"String text = "192.168.10.5[port=8080]";int leftIndex = text.indexOf('[');String ipAddr = text.subString(0, leftIndex);int equalsIndex = text.indexOf('=');String port = text.subString(equalsIndex + 1, text.length()-1);System.out.println("IP地址为:" + ipAddr + "的服务器的" + port + "端口是打开的");2.正则表达式入门之元字符: