答案 0 :(得分:0)
<div class="owl-carousel">
<div class="item"><img src="img/slider1.png" alt="" /></div>
<div class="item"><img src="img/slider1.png" alt="" /></div>
<div class="item"><img src="img/slider1.png" alt="" /></div>
</div>
这是html代码
String myString= "1+2/3";
String[] results = myString.split("(?<=[-+*/])|(?=[-+*/])");
List<String> values = new ArrayList<>();
List<String> operators = new ArrayList<>();
for(String result :results) {
if(result.matches("\\d+(\\.\\d{1,2})?")) { //corrected
values.add(result);
}else {
operators.add(result);
}
}
System.out.println(values); //[1, 2, 3]
System.out.println(operators); //[+, /]