Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
130
rated 0 times [  137] [ 7]  / answers: 1 / hits: 15379  / 6 Years ago, sat, august 18, 2018, 12:00:00

I am trying to achieve a glob sync pattern that allows me to meet the following criteria, but unfortunately, im having a hard time working out why the pattern isn't working.



Glob Pattern



glob.sync(./src/handlebar/{a, b, c, d}/**/*.hbs)



File Path Patterns



src/handlebar/b/a/header.hbs
src/handlebar/b/header.hbs
src/handlebar/a/head.hbs [MATCH]
src/handlebar/a/foot.hbs [MATCH]
src/handlebar/c/a/something.hbs
src/handlebar/d/a/button.hbs


What am i doing wrong?


More From » regex

 Answers
8

Spaces are the problem, try:



glob.sync(./src/handlebar/{a,b,c,d}/**/*.hbs)

[#53707] Tuesday, August 14, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
abagail

Total Points: 528
Total Questions: 109
Total Answers: 101

Location: Western Sahara
Member since Mon, May 3, 2021
3 Years ago
;