Move an example to the manual and regenerate man.test (#2639)
This commit is contained in:
1 parent
03db5509cb
commit
f88c4e5888
3 files changed
+55
-17
No files matched your search
@@ -2301,10 +2301,12 @@ sections:
|
||||
The `?` operator, used as `EXP?`, is shorthand for `try EXP`.
|
||||
|
||||
examples:
|
||||
- program: '[.[]|(.a)?]'
|
||||
- program: '[.[] | .a?]'
|
||||
input: '[{}, true, {"a":1}]'
|
||||
output: ['[null, 1]']
|
||||
|
||||
- program: '[.[] | tonumber?]'
|
||||
input: '["1", "invalid", "3", 4]'
|
||||
output: ['[1, 3, 4]']
|
||||
|
||||
- title: Regular expressions
|
||||
body: |
|
||||
|
||||
@@ -2200,10 +2200,12 @@ sections:
|
||||
The `?` operator, used as `EXP?`, is shorthand for `try EXP`.
|
||||
|
||||
examples:
|
||||
- program: '[.[]|(.a)?]'
|
||||
- program: '[.[] | .a?]'
|
||||
input: '[{}, true, {"a":1}]'
|
||||
output: ['[null, 1]']
|
||||
|
||||
- program: '[.[] | tonumber?]'
|
||||
input: '["1", "invalid", "3", 4]'
|
||||
output: ['[1, 3, 4]']
|
||||
|
||||
- title: Regular expressions
|
||||
body: |
|
||||
|
||||
Reference in new issue
Block a user