Move an example to the manual and regenerate man.test (#2639)

This commit is contained in:
itchyny authored and GitHub committed 2023-06-30 07:45:29 +09:00
1 parent 03db5509cb
commit f88c4e5888
3 files changed
+55 -17

No files matched your search

+4 -2
View File
@@ -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: |