正则表达式

1 /(^|[ ]+)#.*/

匹配以#开头的行,#前面有任意多个空格或者tab键也可以匹配。#后面的内容任意。

显然#这个是comment的行了。

原文地址:https://www.cnblogs.com/hustdc/p/7298234.html