Skip to content

Commit

Permalink
Adds example for multiple patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
tomnomnom committed Sep 16, 2018
1 parent b5d868d commit bfdae25
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,20 @@ The pattern definitions are stored in `~/.gf` as little JSON files that can be k
}
```

There are some example pattern files in the `examples` directory.
To help reduce pattern length and complexity a little, you can specify a list of multiple patterns too:

```
▶ cat ~/.gf/php-sources-multiple.json
{
"flags": "-HnrE",
"patterns": [
"\\$_(POST|GET|COOKIE|REQUEST|SERVER|FILES)",
"php://(input|stdin)"
]
}
```

There are some more example pattern files in the `examples` directory.

### Auto Complete

Expand Down
5 changes: 4 additions & 1 deletion examples/php-sources.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"flags": "-HnrE",
"pattern": "(\\$_(POST|GET|COOKIE|REQUEST|SERVER|FILES)|php://(input|stdin))"
"patterns": [
"\\$_(POST|GET|COOKIE|REQUEST|SERVER|FILES)",
"php://(input|stdin)"
]
}

0 comments on commit bfdae25

Please sign in to comment.