summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkoppstein <pkoppstein@gmail.com>2023-06-15 18:59:48 -0400
committerGitHub <noreply@github.com>2023-06-16 07:59:48 +0900
commitd2f1ddbd5a55461195941a8e3134360916942104 (patch)
treea19dc523b5c8988cc9076bbd194f84fc338fb2f8
parent52d5988afb5999c71fd24484a93efefa2a9e9a8f (diff)
manual.yml - Perl NG (#2614)
-rw-r--r--docs/content/manual/manual.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml
index f88929d5..0d552c7f 100644
--- a/docs/content/manual/manual.yml
+++ b/docs/content/manual/manual.yml
@@ -2304,9 +2304,12 @@ sections:
jq uses the
[Oniguruma regular expression library](https://github.com/kkos/oniguruma/blob/master/doc/RE),
- as do PHP, Ruby, TextMate, Sublime Text, etc, so the
+ as do PHP, TextMate, Sublime Text, etc, so the
description here will focus on jq specifics.
+ Oniguruma supports several flavors of regular expression, so it is important to know
+ that jq uses the ["Perl NG" (Perl with named groups)](https://github.com/kkos/oniguruma/blob/master/doc/SYNTAX.md) flavor.
+
The jq regex filters are defined so that they can be used using
one of these patterns:
@@ -2321,6 +2324,10 @@ sections:
* REGEX, after string interpolation, should be a valid regular expression;
* FILTER is one of `test`, `match`, or `capture`, as described below.
+ Since REGEX must evaluate to a JSON string, some characters that are needed
+ to form a regular expression must be escaped. For example, the regular expression
+ `\s` signifying a whitespace character would be written as `"\\s"`.
+
FLAGS is a string consisting of one of more of the supported flags:
* `g` - Global search (find all matches, not just the first)