复制CSDN的BLOG代码,去掉前面行号的方法[@more@]我们如果从CSDN的BLOG复制代码,出现前面的行号,比如
1. /* 文本没有缩写 */
2. /* Specify blanket rules for all elements */
3. font-size:12px;
4. line-height:160%;
5. font-weight:bold;
6. font-style:italic;
7. font-family: "Lucida Grande",Arial,Sans-serif;
8.
9. /* 文本有缩写 */
10. /* Specify blanket rules for all elements */
11. font: 12px/160% bold italic "Lucida Grande",Arial,Sans-serif;
我们可以用正则表达式替换掉他们。
正则为
^s+d+.
替换为空格就行了
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/220284/viewspace-1010539/
,如需转载,请注明出处,否则将追究法律责任。