假如html標簽里面有一句:
String a = "<style type=\"text/css\"> div \n" +
"{ margin: 0; padding: 0; outline: 0; }</style>";
我如何把這一句取出來呢,包括標簽。
用正則表達式:
<style([\\s\\S]*)</style>
轉載請標明出處: https://www.cnblogs.com/tangZH/p/10491883.html
更多精彩文章: http://77blogs.com/?p=305