猿來(lái)學(xué)院Python爬蟲高級(jí)開發(fā)從入門到精通+實(shí)戰(zhàn)案例全景分析
正則表達(dá)式,多個(gè)斜杠替換成單個(gè)斜杠
public static void main(String[] args) {
? ?String str = "//content/member//getOne";
? ?/**
? ? * str=/content/member/getOne
? ? */
? ?str = str.replaceAll("/+","/");
? ?System.out.println(str);}
標(biāo)簽: