cleanup Nim's examples/ directory; closes #7725
This commit is contained in:
parent
1a60ffcf1d
commit
320582a55c
68 changed files with 2 additions and 8623 deletions
7
examples/extract_keyval_pairs_pegs.nim
Normal file
7
examples/extract_keyval_pairs_pegs.nim
Normal 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[0],
|
||||
" Value: ", matches[1]
|
||||
Loading…
Add table
Add a link
Reference in a new issue