我必须从 list 中删除 1.1 [test, 1.1 test1, test, tsest]。我尝试了以下代码但它不起作用
List<String> li = new ArrayList<>();
for(WebElement el : element)
{
String str = el.getText();
if(str.contains("0-9"))
{
String intValue = str.replace("[0-9]", " ");
li.add(intValue);
}else
{
li.add(str);
}
相关分类