Skip to content

Commit

Permalink
manual.yml - Perl NG (#2614)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoppstein authored Jun 15, 2023
1 parent 52d5988 commit d2f1ddb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/content/manual/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down

0 comments on commit d2f1ddb

Please sign in to comment.