Skip to main content
1 of 4
ovs
  • 61.2k
  • 3
  • 49
  • 164

Haskell, 50 bytes

f[]=1 f('[':a:b:c:d:s)=length[a..c]*f s f(a:s)=f s 

Try it online!

ovs
  • 61.2k
  • 3
  • 49
  • 164