你能不能给我任何帮助,让jade包含正则表达式。
我的代码看起来像这样
html
body
.container
include header.jade
include body part
include footer part.jade
Regx应该给出
header.jade
body part
footer part.jade
我试过这个但是它适用于没有空格的文件名,但是包含空格的文件失败了。
/include\s([^\n\s]+)*/g;
答案 0 :(得分:1)
您只需要将包含一个组与该行的其余部分匹配
/include\s+(.*)/g
答案 1 :(得分:0)
这是你需要的吗?
/include\s{1}[\s\w0-9]+\.jade/;