From 81bae32aa36366f28d949ac8fa7aaa8cdb853807 Mon Sep 17 00:00:00 2001 From: "Izzard, Robert Dr (Physics)" <r.izzard@surrey.ac.uk> Date: Tue, 7 Dec 2021 12:31:10 +0000 Subject: [PATCH] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ef6fb8d..1564d8a 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ A Python script to load and filter a JSON file, showing the nested-key structure The first argument should be the JSON filename. -Following arguments are optional, and are one or more of: +The following filter arguments are optional and are one or more of: -+regex : any key in the path must match the regex (like "grep") --regex : no key in the path can match the regex (like "grep -v") -$regex : the final key in the path must match the regex (note: you may have to - escape the $ in your terminal) -^regex : the first key in the path must match the regex +- `+regex` : any key in the path must match the regex (like "grep") +- `-regex` : no key in the path can match the regex (like "grep -v") +- `$regex` : the final key in the path must match the regex (note: you may have to escape the $ in your terminal) +- `^regex` : the first key in the path must match the regex +`regex` means Regular Expression. While you can use simple strings, these will be interpreted as regular expressions. If you are not familiar with these, you might want to start at https://en.wikipedia.org/wiki/Regular_expression . Requires various standard Python modules that, if not available, are easily -- GitLab