To be honest, I've never used pegs in Nim before but looking at it's source, it 
has MaxSubpatterns = 20. So, I guess either you can define matches as 
newSeq[string](20) or you can use this,
    
    
    if fixedString =~ peg"cd\s+{\D}\:":
        echo matches[0]
    
    
    Run

without defining matches at all, because it injects matches variable itself, if 
there is none at current scope.

Reply via email to