Closed
Description
scan(regex) works
scan(regex; flags) doesn't
Running under debian 8 (jessie) and Ubuntu focal (20.04.1) with jq-linux64 1.6:
$ echo '"#big #Big #bIg #bigs #biG"' | jq '.|scan("#big\S*")'
"#big"
"#bigs"
$ echo '"#big #Big #bIg #bigs #biG"' | jq '.|scan("#big\S*";"i")'
jq: error: scan/2 is not defined at , line 1:
.|scan("#big\S*";"i")
jq: 1 compile error
Also, the online documentation for jq 1.6 shows example only for scan(regex).
Expected to get same positive results I get from test(regex; flags).
Running jq -n 'builtins' reveals the only incidence of "scan" is "scan/1".
Thanks! Otherwise, I absolutely adore this wonderful program!
-Mike B
[edits: clarifying version of jq I'm running and added reference to 'builtins' lacking scan/2]
Metadata
Metadata
Assignees
Labels
No labels