manual.yml - Perl NG (#2614)

This commit is contained in:
pkoppstein authored and GitHub committed 2023-06-16 07:59:48 +09:00
1 parent 52d5988afb
commit d2f1ddbd5a
1 file changed
+8 -1
+8 -1
View File
@@ -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)