version 0.8.2
This commit is contained in:
parent
581572b28c
commit
053309e60a
125 changed files with 6564 additions and 1308 deletions
7
examples/keyval2.nim
Executable file
7
examples/keyval2.nim
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
# Filter key=value pairs from "myfile.txt"
|
||||
import pegs
|
||||
|
||||
for x in lines("myfile.txt"):
|
||||
if x =~ peg"{\ident} \s* '=' \s* {.*}":
|
||||
echo "Key: ", matches[1],
|
||||
" Value: ", matches[2]
|
||||
Loading…
Add table
Add a link
Reference in a new issue