keyval.nim 174 B

12345678910
  1. # Filter key=value pairs from "myfile.txt"
  2. import re
  3. for x in lines("myfile.txt"):
  4. if x =~ re"(\w+)=(.*)":
  5. echo "Key: ", matches[0],
  6. " Value: ", matches[1]