You can use this (which most shells support as well):
glob.sync(path + '**/*.{html,xhtml}')
Or this one:
glob.sync(path + '**/*.@(html|xhtml)')
EDIT: I initially also suggested this pattern:
glob.sync(path + '**/*.+(html|xhtml)')
However, this will also match files that have .htmlhtml as extension (plus any other combination of html and xhtml, in single or multiple occurrences), which is incorrect.
You can use this (which most shells support as well):
Or this one:
EDIT: I initially also suggested this pattern:
However, this will also match files that have
.htmlhtmlas extension (plus any other combination ofhtmlandxhtml, in single or multiple occurrences), which is incorrect.