Try this
    
    
    import strutils
    var str = "spam eggs \"spam and eggs\" asd zxc"
    
    var spl = str.split("\"")
    
    
    for s in 0..spl.high:
      if spl[s].startsWith(" ") or spl[s].endsWith(" "):
        spl[s] = spl[s].strip
    
    echo spl
    
    
    Run

Reply via email to