extract_keyval_pairs_re.nim 165 B

123456789
  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], " Value: ", matches[1]