mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
10 lines
180 B
Nim
10 lines
180 B
Nim
# Filter key=value pairs from "myfile.txt"
|
|
import regexprs
|
|
|
|
for x in lines("myfile.txt"):
|
|
if x =~ r"(\w+)=(.*)":
|
|
echo "Key: ", matches[1],
|
|
" Value: ", matches[2]
|
|
|
|
|