Reputation: 133
Can you please give me any help to get jade includes with regular expression.
My code looks like this
html
body
.container
include header.jade
include body part
include footer part.jade
Regx should give
header.jade
body part
footer part.jade
I have tried this but it works for file names without spaces but fails with the file which contain spaces.
/include\s([^\n\s]+)*/g;
Upvotes: 1
Views: 598
Reputation: 7507
You just need to match the include with a group for the rest of the line
/include\s+(.*)/g
Upvotes: 1